I have a grid in a Viewbox. If shrink the width of my window the grid getting smaller.. but if I shrink the height, nothing happened.
+2
A:
Sounds Like the parent container is the problem! I have solved this changing the parent container to Grid (from the default StackPanel in for instance ItemsControl.ItemsPanelTemplate).
Lets see the complete xaml!
code-zoop
2010-01-22 11:19:15
The parent cotainer is already a grid.
elr
2010-01-22 11:25:42
And the height is set to *?
code-zoop
2010-01-22 11:27:41
I didn't set any width or height?
elr
2010-01-22 12:35:13
You can also try and use DockPanel with LastChildFill set to True: <DockPanel LastChildFill="True"> If the ViewBox is in the last child, it should scale in the height as well as width!
code-zoop
2010-01-22 13:07:06