我有一个WPF 页面 (不是窗口)应用程序,我希望它没有边框/看到Windows任务栏全屏。 我见过的所有说明都适用于WPF Windows 。
I have a WPF Pages(not Window) application, and I would like for it to go fullscreen without the border/seeing the windows taskbar. All the instructions i've seen are for WPF Windows.
最满意答案
Pages应用程序旨在在容器内运行。 容器可以是浏览器或您自己的窗口。
由容器来处理全屏操作。
编辑好的,我明白了。 当没有窗口时,框架会为您创建一个窗口。 您可以使用Application.MainWindow访问该窗口,您可以通过这种方式更改属性(vb代码):
Private Sub Application_Activated(sender As Object, e As System.EventArgs) Handles Me.Activated Me.MainWindow.WindowState = WindowState.Maximized Me.MainWindow.WindowStyle = WindowStyle.None End Sub不过我不建议您继续这种方式,创建一个窗口并在其上放置一个框架,这样您就可以对窗口进行更多控制。
有关WPF Navigation的更多信息,请查看本文http://www.paulstovell.com/wpf-navigation
Pages apps are designed to run inside a container. The container can be the browser or your own window.
It's up to the container to handle the full screen operation.
edit Ok, I get it. When no window is present, the framework creates one for you. You can access the window using Application.MainWindow and you can change the properties this way (vb code):
Private Sub Application_Activated(sender As Object, e As System.EventArgs) Handles Me.Activated Me.MainWindow.WindowState = WindowState.Maximized Me.MainWindow.WindowStyle = WindowStyle.None End SubNevertheless I don't recommend you to continue this way, create a Window and put a frame on it, so you can have more control on the window.
For more info on WPF Navigation check out this article http://www.paulstovell.com/wpf-navigation
更多推荐
发布评论