WPF throws “Cannot locate resource” exception when loading the image

后端 未结 1 1438
天涯浪人
天涯浪人 2020-12-05 17:13

I am having a WPF window, with a background image of one file in my local system. So the XAML file looks like this:

 
    

        
相关标签:
1条回答
  • 2020-12-05 17:41

    In Solution Explorer set the image file's Build Action property to Resource. Then clean the solution and rebuild it.

    0 讨论(0)
提交回复
热议问题