tags:

views:

35

answers:

1

Here is the sample pseudo XAML code

<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 window

Listbox 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.

+1  A: 

Use a StackPanel instead of your Grid.

Mart