WPF Icon for all app windows

后端 未结 5 1079
天命终不由人
天命终不由人 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条回答
  •  甜味超标
    2020-12-08 04:40

    A good reference on the subject is here MSDN. States that you have an Icon for the Application (Desktop Icon), and one for each Window.

    A WPF window always displays an icon. When one is not provided by setting Icon, WPF chooses an icon to display based on the following rules:

    1. Use the assembly icon, if specified.

    2. If the assembly icon is not specified, use the default Microsoft Windows icon.

    Community Content Reference:

    "A liitle tip : if you set the application icon and expect to see it on the window - it wont show up if running in debug from VS. Running externally or without attaching (ctrl + f5) the icon displays as expected."

提交回复
热议问题