有没有办法在xaml中创建粘性页脚?

时间:2010-09-08 17:44:08

标签: xaml footer sticky

我知道你可以在css中做一个粘性页脚,有没有办法在xaml中做到这一点?或者在xaml中使用css来做同样的事情?我是xaml的新手,所以任何帮助都会受到赞赏。

2 个答案:

答案 0 :(得分:0)

可以使用DockPanels完成。

答案 1 :(得分:0)

如果您的布局发生变化或添加更多控件,我会选择使用网格,因为我发现它们更容易扩展:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Label Grid.Row="0" Grid.Column="0" Content="Label at the top"/>


    <Label Grid.Row="0" Grid.Column="0" Content="Label at the bottom"/>
</Grid>

有一个不错的教程here

相关问题