有什么方法可以在xaml中创建粘性页脚吗? [英] Is there any way to create a sticky footer in xaml?

查看:60
本文介绍了有什么方法可以在xaml中创建粘性页脚吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以在CSS中添加粘性页脚,有什么方法可以在xaml中使用吗?还是在xaml中使用CSS做相同的事情?我是xaml的新手,所以我们将不胜感激.

I know you can do a sticky footer in css, is there any way to do it in xaml? Or to use css in xaml to do the same thing? I'm brand new to xaml, so any help would be appreciated.

推荐答案

我会选择网格,因为如果布局更改或添加更多控件,它们会更易于扩展:

I'd opt for a Grid as I find them easier to extend if your layout changes or you add more controls:

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

有一个不错的教程此处

这篇关于有什么方法可以在xaml中创建粘性页脚吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆