WPF - Image 'is not part of the project or its Build Action is not set to Resource'

后端 未结 10 1963
有刺的猬
有刺的猬 2020-12-29 20:26

I have a project which requires an image in the window. This is a static image and i added through \'Add>Existing Item\'. It exists in the root of the project.

I re

10条回答
  •  借酒劲吻你
    2020-12-29 20:49

    I had the same error message but my issues was a simple NOOB mistake.

    When I added my .ico files to "My Project / Resources", VS made a sub folder named Resources and I was trying to use;

    
    

    when I should have been using;

    
    

    ... don't judge, I started using WPF 1 week ago :)

提交回复
热议问题