tags:

views:

132

answers:

1

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
The parent cotainer is already a grid.
elr
And the height is set to *?
code-zoop
I didn't set any width or height?
elr
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