gpt4 book ai didi

c# - 从一页滑动到另一页

转载 作者:太空宇宙 更新时间:2023-11-03 18:26:51 25 4
gpt4 key购买 nike

如何让 Windows 通用应用程序的用户从一个页面滑动到另一个页面? (我以为这很容易找到,但搜索并没有找到答案。)

如果这在一页内是可能的 - 那也很好。 (将一个网格滑出并滑入另一个网格。)

最佳答案

枢轴控件的行为与您描述的一样。

参见 guidelines for tabs and pivots .

例子:

<Page x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Pivot>
<PivotItem Header="Item 1" Background="Black" />
<PivotItem Header="Item 2" Background="Red" />
<PivotItem Header="Item 3" Background="Blue" />
</Pivot>
</Grid>

关于c# - 从一页滑动到另一页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32607412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com