我是一位有用的助手,可以为您进行文本翻译。
我有一个资源图标,其关键字是:xxx
我想将它绑定到xaml中的一个图片上...
1:
<Image Source="{x:Static p:Resources.xxx}"></Image>
2:
<Image>
<Image.Source>
<BitmapImage UriSource="{Binding x:Static p:Resources.xxx}"/>
</Image.Source>
</Image>
3:
<Image Source=" {Binding x:Static p:Resources.xxx,Converter={StaticResource IconToBitmap_Converter}}"></Image>
4:
<Image>
<Image.Source>
<BitmapImage UriSource="{Binding x:Static p:Resources.xxx,Converter={StaticResource IconToBitmap_Converter}}"/>
</Image.Source>
</Image>
以上方法不起作用,我该怎么办?