1 回答
TA贡献1809条经验 获得超8个赞
中的隐式样式Package.xaml应在合并ResourceDictionary本身中定义。尝试这个:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ControlsAndResources.Styles.Default">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ControlsAndResources;component/Styles/Default/Base.xaml"/>
<ResourceDictionary Source="/ControlsAndResources;component/Styles/Default/Buttons.xaml"/>
<ResourceDictionary Source="/ControlsAndResources;component/Styles/Default/Textblocks.xaml"/>
<ResourceDictionary Source="/ControlsAndResources;component/Styles/Default/Textboxes.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button" BasedOn="{StaticResource DefaultButtons}"/>
<Style TargetType="TextBlock" BasedOn="{StaticResource DefaultTextblocks}"/>
<Style TargetType="TextBox" BasedOn="{StaticResource DefaultTextboxes}"/>
</ResourceDictionary>
- 1 回答
- 0 关注
- 168 浏览
添加回答
举报