【发布时间】:2017-12-08 16:07:05
【问题描述】:
我无法访问在 app.xaml 中创建的静态资源。 它是我的 app.xaml 代码
<Application.Resources>
<ResourceDictionary>
<Color x:Key="AppDefaultColor">#07bab7</Color>
<Color x:Key="PageDefaultColor">#f0f0f0</Color>
</ResourceDictionary>
</Application.Resources>
当我尝试在我的页面中将其用作静态资源时,它会出错。 它是我用来从 app.xaml 访问静态资源的页面代码
<Label Text="Test" TextColor="{StaticResource AppDefaultColor}" />
【问题讨论】: