[英]NavigationWindow class: remove navigation bar and maximized NavigationWindow
excuse me for my bad English. 对不起,我的英语不好。
I know that many conversations were made for this type of problem but none answer my specific problem... I am currently improving a Wpf Application coded in C # and xaml in Microsoft Visual Studio Express 2012 for Windows Desktop. 我知道针对这种类型的问题进行了许多对话,但没有一个能回答我的特定问题...我目前正在针对Windows桌面改进Microsoft Visual Studio Express 2012中用C#和xaml编码的Wpf应用程序。
I would like to remove the navigation bar at the top of my window and maximize it. 我想删除窗口顶部的导航栏并将其最大化。 In my xaml file I do:
在我的xaml文件中,我这样做:
NavigationWindow x:Class="WpfAppTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowState="Maximized"
WindowStyle="None"
Title="MainWindow" Height="980 " Width="540" Source="Home.xaml" />
Despite WindowState= "Maximized"
and WindowStyle="None"
the navigation bar is still displayed and the window is still small. 尽管
WindowState= "Maximized"
和WindowStyle="None"
,导航栏仍然显示,并且窗口仍然很小。 I followed several tutorials that removed the navigation bar, but they used a Window class. 我遵循了一些教程,其中删除了导航栏,但它们使用的是Window类。 I did some tests on a new project by creating a class Window and I can well maximize and remove the navigation bar from my window.
我通过创建类Window对新项目进行了一些测试,并且可以很好地最大化和删除窗口中的导航栏。 But in my case I need to improve an application in progress but the main window type is MainWindow
但就我而言,我需要改进一个正在进行的应用程序,但主窗口类型是MainWindow
Indeed the source Source= "Home.xaml"
is no longer recognized after the change Navigation Window to Window. 实际上,在将“导航窗口”更改为“窗口
Source= "Home.xaml"
之后,不再能识别源Source= "Home.xaml"
。 My application contains several pages and I must navigate through it so I have to keep my "Home" type "page" page: <Pagex:Class = "WpfAppTest.Home"
. 我的应用程序包含几个页面,因此我必须浏览它,因此必须保留“主页”类型的“页面”页面:
<Pagex:Class = "WpfAppTest.Home"
。 Do you have any idea where my problem may be? 您知道我的问题可能在哪里吗?
Thanks you in advance. 预先谢谢你。
Geoffrey 杰弗里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.