【发布时间】:2015-09-10 17:14:27
【问题描述】:
Windows 为 Windows 10 通用应用程序提供明暗主题。这在请求主题的应用程序节点中的 App.xaml 中进行了更改。
<Application
x:Class="Template.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Template"
RequestedTheme="Dark">
有没有办法制作自定义主题?我意识到您可以制作资源字典并放置自定义颜色,但是您必须在要应用它的每个属性中包含 {static resource...} 。我认为定义我自己的 RequestedTheme 很容易,所以我只需要包含一次。
【问题讨论】:
标签: xaml themes win-universal-app windows-10