Pack URI and path not resolving image in WPF

前端 未结 3 687
梦如初夏
梦如初夏 2021-01-13 13:08

I have the following directory structure

Project
\\Images
 +view.png
control.xaml

and in the control I have a button defined by the followi

3条回答
  •  轮回少年
    2021-01-13 13:45

    Set the Build Action for 'view.png' to Resource instead of Content and this problem should go away. I was able to reproduce your problem this way and it works correctly when set as a Resource.

提交回复
热议问题