Is it possible to display a wpf window without an icon in the title bar?

前端 未结 6 1363
遥遥无期
遥遥无期 2021-01-01 10:23

As we all know, if the icon for a wpf window is undefined then the default icon is displayed. I want to display a window without any icon in the title bar. I realise that I

6条回答
  •  一整个雨季
    2021-01-01 10:40

    While not exactly a proper solution, you could try one of the following things:

    1. Setting the WindowStyle-Property to ToolWindow will make the Icon disappear, but the title bar (obviously) will be smaller.

    2. Write a ControlTemplate for the whole Window. Depending on if the Window has to look like a "real" Window, there'd be much effort into trying to recreate the default Style in the Template.

提交回复
热议问题