WPF 自定义导航按钮并从另一个页面调用一个页面
我有一个窗口,其中包含一个框架,该框架引用一个带有按钮的“主页”页面。单击按钮时,我希望根据按下的按钮显示另一个页面。我尝试使用
NavigationService.Navigate('mynextpage.xaml')
并且有效,但是我想使用自定义的导航面板。 调用
this.ShowsNavigationUI = false;
我在“主页”页面上 但该栏仍然显示。有办法完成我想做的事情吗?
我的带有框架的页面是一个窗口,所以我不知道如何禁用导航栏,我猜它来自那里。
进一步测试表明 ShowsNavigationUI 属性为 false,但一旦有第二个页面可供访问(显示历史记录中的“主页”页面),导航栏就会在父窗口中显示自身
。TIA
I have a window which contains a Frame which references a 'home' page that has buttons on it. When a button is clicked I want another page to show depending on which button was pressed. I attempted to use
NavigationService.Navigate('mynextpage.xaml')
and that works however, I want to use a customized navigation panel. I call
this.ShowsNavigationUI = false;
on my 'home' page but the bar still shows. Is there a way to accomplish what I am trying to do?
My page with the frame is a window so I do not know how to disable the Navigation bar there where I guess it is coming from.
Further testing shows that the ShowsNavigationUI property is false yet the nav bar shows itself in the parent window once there is a second page to go to (showing the 'home' page in the history.
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,你想隐藏框架的导航镶边,这样做设置
if i understand you correctly you want to hide the navigation chrome of a Frame, to do so set