Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WPF按钮图像未显示_C#_Wpf - Fatal编程技术网

C# WPF按钮图像未显示

C# WPF按钮图像未显示,c#,wpf,C#,Wpf,我创建了一个带有图像的按钮: <Button x:Name="btnAddRow" Grid.Row="0" Grid.Column="5" Margin="5, 5" Command="{Binding CmdAddRow}"> <Image Source="pack://application:,,,/Resources/help_16.png" Stretch="None" HorizontalAlignment="Center" /> </Butto

我创建了一个带有图像的按钮:

<Button x:Name="btnAddRow" Grid.Row="0" Grid.Column="5" Margin="5, 5" Command="{Binding CmdAddRow}">
    <Image Source="pack://application:,,,/Resources/help_16.png" Stretch="None" HorizontalAlignment="Center" />
</Button>

图像作为资源包含。在设计器中,将显示图像(蓝色帮助图标):

但在运行时,它不会显示:

有人能帮帮我吗,这里有什么问题吗


非常感谢。

构建操作已设置为资源。但是它没有显示。也尝试了-现在成功了。没有成功:也没有成功:DhlConnector是我的Assemblyname。你使用Prism对吗?而
Resources
文件夹位于模块上,而不是文件夹中?Buildaction设置为resource。但是它没有显示。也尝试了-现在成功了。没有成功:也没有成功:DhlConnector是我的Assemblyname。你使用Prism对吗?而
Resources
文件夹位于模块上,而不是文件夹中?