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
No, this doesn't seem to be possible. Quoting from the documentation of the Icon property (emphasis mine):
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:
- Use the assembly icon, if specified.
- If the assembly icon is not specified, use the default Microsoft Windows icon.
If you use Icon to specify a custom window icon, you can restore the default application icon by setting Icon to
null.
So, apparently a completely transparent icon seems to be your best bet here. Or perhaps hack around all this by using Windows API functions to set the appropriate style on the window. But this may interfere with WPF's window management.