Nor*_*ert 8 c# xaml embedded-resource
可能重复:
WPF图像资源
我的VS C#项目中有一些图像被声明为嵌入式资源.我正在使用以下命令在.cs文件中访问它们:
Stream logoStream = GetType().Assembly.GetManifestResourceStream("ProjNS.Image.logo.png");
Bitmap logo = new Bitmap(logoStream);
Run Code Online (Sandbox Code Playgroud)
但是如何在.xaml文件中访问我的徽标?
像这样调用资源;
<Image Source="Resources/ProjNS.Image.logo.png" height="100" width="100"/>
Run Code Online (Sandbox Code Playgroud)