I'm trying to arrange a WPF UI as follows:
Solutions would be very welcome; I've fiddled for some time and managed to get things working except the controls beneath the ListView, by using an outer DockPanel in the window with the first controls docked to the top, and the ListView filling the remaining space but set to VerticalAlignment="Top".
A pure XAML solution would be ideal, but I don't mind code behind if it's unavoidable. Bonus points for a solution which allows multiple such arrangements to be stacked vertically :) Thanks for any help!
Try
<Grid VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Button Content="hello" />
<ScrollViewer Grid.Row="1" >
<ListView >
<ListBoxItem Content="hi" />
<ListBoxItem Content="hi" />
<ListBoxItem Content="hi" />
<ListBoxItem Content="hi" />
<ListBoxItem Content="hi" />
<!-- Some Items -->
</ListView>
</ScrollViewer>
<Button Content="hello" Grid.Row="2" />
</Grid>