I have a panel with Width = 1400 and it contains smaller Panels with Width = 700. If the screen is at full width the smaller panels should be displayed in 2's per row otherwise it should wrap and a vertical scrollbar should appear.
With the below code the contents are wrapped but no scrollbar:
<StackPanel Grid.Column="1" Grid.Row="1" Background="#FFEAEEFC"><ScrollViewer x:Name="body" HorizontalScrollBarVisibility="Disabled"><WrapPanel Margin="10" MaxWidth="1400"><Border BorderBrush="Black" BorderThickness="1" Width="700" Height="400"></Border><Border BorderBrush="Black" BorderThickness="1" Width="700" Height="400"></Border><Border BorderBrush="Black" BorderThickness="1" Width="700" Height="400"></Border><Border BorderBrush="Black" BorderThickness="1" Width="700" Height="400"></Border></WrapPanel></ScrollViewer></StackPanel>What am i doing wrong?