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.
Asked
Active
Viewed 1,675 times
1 Answers
3
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
- 7,312
- 8
- 47
- 56
-
I didn't set any width or height? – rakete Jan 22 '10 at 12:35
-
You can also try and use DockPanel with LastChildFill set to True:
If the ViewBox is in the last child, it should scale in the height as well as width! – code-zoop Jan 22 '10 at 13:07