WPF背景图片配置成Dynamicresource,加载的时候失败,是因为……
wpf吧
全部回复
仅看楼主
level 1
是因为不允许吗?还是路径问题?
<Grid.Background>
<ImageBrush ImageSource="{DynamicResource SkinBack}"/> </Grid.Background>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml
<ImageSource x:Key="SkinBack">./Pictures/Queuebg.png</ImageSource>
</ResourceDictionary>
上述用法有错吗?跪求指教!在app中,进行加载的时候失败,求指教
Collection<ResourceDictionary> mergedDicts = base.Resources.MergedDictionaries
mergedDicts.Add(skinDict)
2012年07月20日 10点07分 1
level 5
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml
<ImageSource x:Key="SkinBack">./Pictures/Queuebg.png</ImageSource>
</ResourceDictionary>这是谁的resource

2012年07月20日 13点07分 2
level 1
app的,和mainwindow的都试过了,但是都不行。还是爆出异常。
2012年07月23日 02点07分 3
level 5
你去掉第一个./试试
2012年07月23日 06点07分 4
1