可能重复:
WPF image resources
我的 VS C#项目中有一些图像被声明为嵌入资源。我正在使用以下方法在.cs文件中访问它们:
Stream logoStream = GetType().Assembly.GetManifestResourceStream("ProjNS.Image.logo.png");
Bitmap logo = new Bitmap(logoStream);
但是如何在.xaml文件中访问我的徽标?
答案 0 :(得分:0)
像这样调用资源;
<Image Source="Resources/ProjNS.Image.logo.png" height="100" width="100"/>