我知道你可以在 css 中做一个粘性页脚,有没有办法在 xaml 中做到这一点?或者在 xaml 中使用 css 来做同样的事情?我是 xaml 的新手,所以任何帮助将不胜感激。
问问题
978 次
2 回答
0
可以使用 DockPanel 来完成。
于 2010-09-09T19:27:25.290 回答
0
我会选择 Grid,因为如果您的布局更改或添加更多控件,我发现它们更容易扩展:
<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>
这里有一个不错的教程
于 2012-11-17T14:19:24.650 回答