Search code examples
wpfresizeviewbox

WPF Viewbox only shrink if I shrink the window horizontally


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.


Solution

  • 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!