WPF Icon for all app windows

后端 未结 5 1078
天命终不由人
天命终不由人 2020-12-08 03:42

It is possible to set one Icon so, that it would be used on every window in current app. So that i set it once (not on every window by hand)..?

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 04:21

    Under VS2010 open the Properties for the main application executable and open the Application tab. Set the icon under 'Icon and Manifest' in the Resources section.

    To see the icon while debugging under VS2010 you need to open the Debug tab and uncheck the option for 'Enable the Visual Studio hosting process', otherwise you will only see the default icon on most windows.

    I assume that the icon loading code is getting confused by the hosting process and is looking in "someapplication.vshost.exe" instead of "someapplication.exe" for the icons.

    This looks like it's fixed in VS2013.

提交回复
热议问题