开发者

Nonstandard floating layout - grow then stop

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


Use a StackPanel instead of your Grid.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜