【发布时间】:2010-05-19 02:59:24
【问题描述】:
要在 wpf 中使用图像,您可以定义:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="ImageFunTime"
UriSource="../Resources/Images/ImageFunTime.png" />
</
然后在应用程序的某个地方你可以:
var img = (ImageSource)positionsTab.TryFindResource("ImageFunTime");
如何使用嵌入式 Xslt 文件实现相同的功能?也就是说,资源字典中的语法是什么,因为它显然不是位图图像......
TIA
【问题讨论】:
-
好问题 (+1)。请参阅我的答案以获得完整的解决方案。 :)
标签: c# wpf resources resourcedictionary