通用 Windows 10 应用程序的启动画面 [英] Splash screen for universal windows 10 apps

查看:46
本文介绍了通用 Windows 10 应用程序的启动画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个针对 Windows Phone 和 Windows 桌面的 Windows 10 通用应用程序,我面临的问题是当通过 package.manifest 文件向应用程序添加启动画面时,没有添加启动画面的选项适合手机的纵向(见下图),

当我在手机上部署应用程序时,启动画面如下所示.

解决方案

在这种情况下,您还需要在第一个屏幕截图上指定背景颜色.

阅读本文-

<块引用>

对于 Windows Phone 商店应用,至少提供 2.4 倍资产;最好全部.图像文件资产本身应该有一个透明背景.在您的应用清单中,设置SplashScreen@Image 属性为Assets\.png",并设置一个VisualElements@BackgroundColor 的值.

您可以从此链接阅读更多信息.

链接的前半部分似乎在谈论 Windows 8.1 & 中的启动画面.Windows Phone 8.1,包括我上面引用的段落,但同样的规则适用于 Windows 10.我认为考虑到所有不同大小的设备,你不可能有一个完整的页面启动画面.以前它仍然是可能的,因为您可以简单地删除启动画面并在您的应用程序中创建一个 xaml 启动用户控件,但由于启动画面在 UWP 中成为强制性的,我只是看不到任何其他方法来实现这一点.

I am creating a windows 10 universal app targeted for both Windows Phones and Windows Desktop, the problem I am facing on is when adding splash screen through the package.manifest file to the app, there is no option to add splash screen which fits the phone's portrait orientation (see the image below),

And when I deploy the app on the phone the splash screen appears like shown below.

解决方案

In this case, you will also want to specify the Background color, on your first screenshot.

Read this -

For a Windows Phone Store app, provide the 2.4x asset at a minimum; preferably all. The image file assets themselves should have a transparent background. In your app manifest, set the value of the SplashScreen@Image property to "Assets\.png", and set a value for VisualElements@BackgroundColor.

You can read more from this link.

The first half of the link seems to be talking about splash screens in the Windows 8.1 & Windows Phone 8.1, including the paragraph I quoted above, but the same rules apply to Windows 10. I don't think you can have a full page splash screen given all the different sized devices. Previously it would still be possible 'cause you could simply remove the splash screen and create a xaml startup usercontrol within your app, but since the splash screen becomes mandatory in UWP, I just don't see any other way to achieve this.

这篇关于通用 Windows 10 应用程序的启动画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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