Windows 8 问题I can';t在SimpleBlogReader Windows 8教程中解决
我将遵循此处的教程: 在关于设置应用程序样式的部分中,他们希望您在ResourceDictionary中插入一些XamlWindows 8 问题I can';t在SimpleBlogReader Windows 8教程中解决,windows-8,windows-store-apps,winrt-xaml,Windows 8,Windows Store Apps,Winrt Xaml,我将遵循此处的教程: 在关于设置应用程序样式的部分中,他们希望您在ResourceDictionary中插入一些Xaml <SolidColorBrush x:Key="WindowsBlogBackgroundBrush" Color="#FF0A2562"/> <Style x:Key = "WindowsBlogLayoutRootStyle" TargetType = "Panel" BasedOn = "{StaticResource LayoutRootStyle
<SolidColorBrush x:Key="WindowsBlogBackgroundBrush" Color="#FF0A2562"/>
<Style x:Key = "WindowsBlogLayoutRootStyle" TargetType = "Panel" BasedOn = "{StaticResource LayoutRootStyle}">
<Setter Property="Background" Value="{StaticResource WindowsBlogBackgroundBrush}"/>
</Style>
但是,编译器给了我以下错误:
错误WMC0035:对“ResourceDictionary”对象的“\u Items”属性进行重复分配
属性元素不能位于元素内容的中间。它们必须在内容之前或之后
有人知道这是怎么回事吗 谢谢
我已经在布局网格中对其进行了测试。您的示例中缺少SolidColorBrush的结束块。它是否在您的Xaml文件中?您没有提供足够的信息来回答您的问题。
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<SolidColorBrush x:Key="WindowsBlogBackgroundBrush" Color="#FF0A2562" />
<Style x:Key="WindowsBlogLayoutRootStyle" TargetType="Panel" >
<Setter Property="Background" Value="{StaticResource WindowsBlogBackgroundBrush}"/>
</Style>
</ResourceDictionary>
<!--
Styles that define common aspects of the platform look and feel
Required by Visual Studio project and item templates
-->
<ResourceDictionary Source="Common/StandardStyles.xaml">
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>