I have a ploblem with resizing of ImageView in StackPane: If StackPane is root container and I bind image's height and width to StackPane, everything is fine.
<StackPane id="StackPane" fx:id="stack" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: lightgreen;" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" fx:controller="javafxapplication8.FXMLController">
<children>
<ImageView fx:id="image" fitHeight="100.0" fitWidth="300.0" pickOnBounds="true" preserveRatio="true" />
</children>
<stylesheets>
<URL value="@fxml.css" />
</stylesheets>
</StackPane>
But if I place such stack pane in, for example, grid, than image doesnt resize properly. As I read, the problem that ImageView is non-Resizable. Is there any ways to make it resizable? Or could you give some advise how to resize ImageView?