NavigationView 和其他设置按钮 [英] NavigationView and additional settings button
问题描述
我想在 NavigationView 中的设置项(按钮)之前添加新项 (
您可以使用 PaneFooter
在 Settings
按钮上方放置附加内容:
<NavigationView.PaneFooter><StackPanel Orientation="垂直"><NavigationViewItem Icon="SelectAll" Content="全选"/><NavigationViewItem Icon="Help" Content="Help"/></StackPanel></NavigationView.PaneFooter></NavigationView>
不幸的是,控件不会自动处理该区域中菜单项的选择,因此所选项目突出显示"(左侧的滑动矩形)不会移动到 PaneFooter
中的项目,因为控制不知道"他们.
I would like to add new item right before settings item (button) in NavigationView (https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview). I have no idea how to add such functionality
I've tried to modify style of control but after adding button is style i had no behavior as expected. There was no navigation for that element. What I want to achieve:
You can use PaneFooter
to place additional content to above the Settings
button:
<NavigationView>
<NavigationView.PaneFooter>
<StackPanel Orientation="Vertical">
<NavigationViewItem Icon="SelectAll" Content="Select all" />
<NavigationViewItem Icon="Help" Content="Help" />
</StackPanel>
</NavigationView.PaneFooter>
</NavigationView>
Unfortunately the control will not handle the selection of menu items in this area automatically so the "selected item highlight" (sliding rectangle on the left) will not move to the items in PaneFooter
, because the control "doesn't know" about them.
这篇关于NavigationView 和其他设置按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!