What worked was setting it directly with FitToWidt...
# tornadofx
h
What worked was setting it directly with FitToWidth, but I want to resize the whole stackpanel with my rectangles and friends, not only the image.