How to change title bar image in WPF Window?

后端 未结 6 2343
太阳男子
太阳男子 2020-12-14 14:58

How to change the titile bar image (the top-left most icon) in WPF?

6条回答
  •  悲&欢浪女
    2020-12-14 15:02

    Easy way to add image to title bar:

    In your Project, Select - Properties - Application - Resources - Icon and Manifest - select the .ico image(always convert your image to .ico)

    Add this line(icon) in WPF Main window:

    Title="xxxxx" **Icon="xxxxxx.ico"**>
    

提交回复
热议问题