Windows 8 找不到名为/Key AppBarButtonStyle的资源
winrt中包含的常见样式给我带来了一个例外Windows 8 找不到名为/Key AppBarButtonStyle的资源,windows-8,windows-store-apps,winrt-xaml,Windows 8,Windows Store Apps,Winrt Xaml,winrt中包含的常见样式给我带来了一个例外 <Button Style="{StaticResource AppBarButtonStyle}" /> 此基本代码激发无法找到名为/Key AppBarButtonStyle异常的资源 <Button Style="{StaticResource AppBarButtonStyle}" /> 常用资源包含在my app.xaml中,我可以浏览此样式的定义 我是不是错过了什么重要的东西 ps:我尝试重新启动VS,以下
<Button Style="{StaticResource AppBarButtonStyle}" />
此基本代码激发无法找到名为/Key AppBarButtonStyle
异常的资源
<Button Style="{StaticResource AppBarButtonStyle}" />
常用资源包含在my app.xaml中,我可以浏览此样式的定义
我是不是错过了什么重要的东西
ps:我尝试重新启动VS,以下是您的三个可能原因:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
祝你好运 我遇到这个问题是在一个单独的资源字典里定义
<Button Style="{StaticResource AppBarButtonStyle}" />
如果将其放到某个页面的转页内部的资源里,嗯
我解决这个问题是在资源字典头部添加
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
我通过在扩展AppBarButtonStyle的自定义样式之前定义AppBarButtonStyle来修复它 在Windows 8.1中,包含AppBarButtonStyle的StandardStyles.xaml文件已被删除。相反,您可以使用AppBarButton,如下所示:
有没有可能用英语提供这个问题?翻译:我遇到的这个问题是在一个单独的资源字典中定义的。如果您将它放在某个页面的XAML内的资源中,则可以。我通过添加资源字典头解决了这个问题。