简体   繁体   English

Windows 10移动版是否支持UWP应用程序的Fluent设计系统?

[英]Does Windows 10 Mobile support the Fluent Design System for UWP apps?

I'm developing a new UWP app with the Fluent Design System (Acrylic Background and reveal) but apart from being available on Windows 10 Desktop, I also want to publish the application to Windows 10 Mobile. 我正在使用Fluent设计系统开发一个新的UWP应用(丙烯酸背景并显示),但是除了Windows 10桌面上可用之外,我还想将该应用发布到Windows 10移动版上。 Does Windows 10 Mobile support the Fluent Design System? Windows 10 Mobile是否支持Fluent设计系统? Or do I have to develop another application just for Windows 10 Mobile without the Fluent Design System? 还是我必须为没有Fluent设计系统的Windows 10移动版开发另一个应用程序?

Windows 10 Mobile build 10.0.15063 (Creators Update) supports composition effects as well as in-app acrylic (see How to use Acrylic Accent in Windows 10 Creators Update? ) and reveal effects via the composition API. Windows 10移动版内部版本10.0.15063(Creators Update)支持合成效果以及应用程序内丙烯酸(请参阅如何在Windows 10 Creators Update中使用Acrylic Accent? ),并通过合成API显示效果。

However, it does not support the AcrylicBrush or RevealBrush classes, as those classes are only available in build 10.0.16299 (Fall Creators Update) or later, which is not available for mobile devices (the current feature branch is build 10.0.15254, which is also dubbed the "Fall Creators Update" but does not actually include the new APIs). 但是,它支持AcrylicBrushRevealBrush类,这些类仅在构建10.0.16299(秋季创作者更新)或更高版本,不适用于移动设备上使用(目前的功能分支建立10.0.15254,这也被称为“秋季创作者更新”,但实际上并未包含新的API)。

While it is possible to incorporate Fluent Design elements into your Windows 10 Mobile app for devices running the Windows 10 Mobile Creators Update, doing so is far more trouble than it's worth. 对于运行Windows 10 Mobile Creators Update的设备,可以将Fluent Design元素合并到Windows 10 Mobile应用程序中,但是这样做的麻烦远不止于此。 You will need to avoid using AcrylicBrush and RevealBrush since they're not available to mobile devices, and you will need to do in-app acrylic and reveal effects the hard way. 您将需要避免使用AcrylicBrushRevealBrush因为它们不适用于移动设备,并且您将需要进行应用内丙烯酸处理,并很难显示效果。

You don't need to make a separate app for mobile; 您无需为移动设备制作单独的应用程序; if your minimum target version is 10.0.15063 you can use conditional XAML to serve a legacy resource dictionary to mobile devices and Fluent Design to PCs. 如果最低目标版本是10.0.15063,则可以使用条件XAML为移动设备提供旧版资源字典,为PC提供Fluent Design。 If your minimum target version is an older version that doesn't support conditional XAML, you need to use Windows.Foundation.Metadata.ApiInformation.IsTypePresent() to check for AcrylicBrush and/or RevealBrush and merge the appropriate resource dictionary into your Application.Current.Resources manually. 如果最低目标版本是不支持条件XAML的较旧版本,则需要使用Windows.Foundation.Metadata.ApiInformation.IsTypePresent()检查AcrylicBrush和/或RevealBrush 并将适当的资源字典合并到您的Application.Current.Resources手动。

To use this brush you should know that it works if: 要使用此笔刷,您应该知道它在以下情况下有效:

  1. Device family Windows 10 Fall Creators Update (introduced v10.0.16299.0) 设备系列 Windows 10 Fall Creators Update(已推出v10.0.16299.0)

  2. API contract Windows.Foundation.UniversalApiContract (introduced v5) API合约 Windows.Foundation.UniversalApiContract(v5引入)

More information https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.acrylicbrush 更多信息https://docs.microsoft.com/zh-cn/uwp/api/windows.ui.xaml.media.acrylicbrush

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM