您可以将页面设置为没有样式吗? [英] Can you set a page to have no style?

查看:69
本文介绍了您可以将页面设置为没有样式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,您可以在wpf中创建没有任何样式的新页面吗?在使用窗口的WPF中,您没有设置任何样式,但是在页面上我看不到该如何完成.

Hi, can you create a new page in wpf without any style? In a wpf using a window you make the style none, however on a page I can''t see how this can be done.

cheers.

推荐答案

页面也具有"ShowsNavigationUI"属性.
应用程序始终具有主窗口,可以有两种类型:
1)窗口.
2)NavigationWindow.
``NavigationWindow''继承自``Window''.

如果要隐藏所有导航UI,请使用以下代码:
((NavigationWindow)Application.Current.MainWindow).ShowsNavigationUI = false;

如果只想在一页隐藏导航UI,则:
this.ShowsNavigationUI = false;
其中"this"是"Page".

此属性隐藏导航UI,但窗口将具有最小化按钮和其他按钮.
然后您可以使用:
((Window)Application.Current.MainWindow).WindowStyle = WindowStyle.None.ShowsNavigationUI = false;
Page has the property ''ShowsNavigationUI'' too.
Application always has the main window, which can be of two types:
1)Window.
2)NavigationWindow.
''NavigationWindow'' inherited from ''Window''.

If you want to hide all navigation UI, then use this code:
((NavigationWindow)Application.Current.MainWindow).ShowsNavigationUI = false;

If you want to hide navigation UI only at one page, then:
this.ShowsNavigationUI = false;
Where ''this'' is the ''Page''.

This property hide navigation UI, but window will have minimize button and other.
Then you can use:
((Window)Application.Current.MainWindow).WindowStyle = WindowStyle.None.ShowsNavigationUI = false;


这篇关于您可以将页面设置为没有样式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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