送分题 wpf 换肤
WPF使用动态资源字典换肤
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="brMainBackground" Color="BurlyWood"></SolidColorBrush>
<Image x:Key="imImage1" Source="/Gridplan;component/Images/tool1.bmp"></Image>
</ResourceDictionary>
<Button Height="23" HorizontalAlignment="Left" Margin="0,6,0,0" Name="button1" VerticalAlignment="Center" Width="45" Click="button1_Click" >
<Image Source="{DynamicResource imImage1}"></Image> //这里绑定的
</Button>
运行的时候报异常!!是我的用法不对?还是其他原因呢??