How to use Resources.resx to link images

前端 未结 5 1486
轮回少年
轮回少年 2020-12-03 17:44

I have included an icon file inside my Resources.resx that I\'d like to show on a TreeViewItem that is inside a stackpanel.

1)Can .ico files be used for this purpose

5条回答
  •  醉梦人生
    2020-12-03 18:36

    First: Add resources rsx then: add images as images to the resource file and set the image build action to Resource. Now you can access the images like this:

    
    

提交回复
热议问题