Here is the sample pseudo XAML cod开发者_如何学编程e
<Window>
<Grid Rows="2">
<Listbox Row="0"/>
<Button Row="1"/>
</Grid>
</Window>
Grid doesn't work here, just for example
Listbox is databinded and can have multiple items
Button is placed under the ListBox - immediately under, not on bottom of windowListbox can grow, moving Button down until Button is on bottom of window. Then Listbox gets vertical scrollbar and scrolls its items, with Button remaining on bottom.
I can't remember seeing such layout, and think it can't be done without binding to ActualHeight/using some converter code, which i'm really bad.
Thanks in advance.
Use a StackPanel
instead of your Grid
.
精彩评论