How to maximise a Windows 10 Universal Application#39;s window to full screen when running on a desktop?(在桌面上运行时,如何将 Windows 10 通用应用程序的窗口最大化为全屏?)
问题描述
使用 Windows 10(或 Windows 8.1 WinRT)构建通用应用程序时,是否可以强制应用程序的主窗口在启动时最大化?这显然是应用程序在移动设备上运行时的自然行为,但在桌面上运行时则不然.
When building a universal application using Windows 10 (or Windows 8.1 WinRT), is it possible to force the application's main window to maximise on launch? This is obviously natural behaviour for the application when running on a mobile device but not when running on the desktop.
这当然可以使用 WinForms:
This is certainly possible using WinForms:
- 如何让 WinForms 应用程序完全运行屏幕
- 如何在任务栏顶部全屏显示 Windows 窗体?
但到目前为止,我还没有在 Microsoft 文档中找到任何关于 Windows 10 的信息.
But I haven't so far managed to find anything in the Microsoft Documentation about this for Windows 10.
推荐答案
应用可以通过设置 ApplicationView 来请求全屏启动.PreferredLaunchWindowingMode 到 ApplicationViewWindowingMode.FullScreen
An app can request to start as full screen by setting the ApplicationView.PreferredLaunchWindowingMode to ApplicationViewWindowingMode.FullScreen
Roberth 在他的构建会话中讨论了这一点以及其他视图和窗口大小问题通用 Windows 中的导航和窗口化应用程序
Roberth discussed this along with other view and window size issues in his Build session Navigation and Windowing in Universal Windows Apps
这篇关于在桌面上运行时,如何将 Windows 10 通用应用程序的窗口最大化为全屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在桌面上运行时,如何将 Windows 10 通用应用程序的窗口最大化为全屏?
基础教程推荐
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
