I think the solutions using P/Invoke are ugly, but they should work:
http://blogs.msdn.com/b/wpfsdk/archive/2007/08/02/a-wpf-window-without-an-window-icon-the-thing-you-click-to-get-the-system-menu.aspx[
^],
http://winsharp93.wordpress.com/2009/07/21/wpf-hide-the-window-buttons-minimize-restore-and-close-and-the-icon-of-a-window/[
^].
I would probably prefer a .NET-only work-around.
You can use different windows style by assigning different value to the property
System.Windows.Window.WindowStyle
. You can also do it in XAML, in the top-level tag
<Window>
. Use the value of
System.Windows.WindowStyle.ToolWindow
. See:
http://msdn.microsoft.com/en-us/library/system.windows.window.windowstyle.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.windowstyle.aspx[
^].
Alternatively, you can use
System.Windows.WindowStyle.None
, but in this case you won't have any non-client areas at all, not a title bar and buttons, nothing. This style is usually used to develop windows with non-rectangular shapes and other cases of highly customized appearance. In certain applications, the missing control elements of non-client area (such as close, minimize/restore buttons, system menu, etc.) are simply simulated in the client area using WPF controls, custom or not.
Pay attention for this second option; it is not so cumbersome as it might seem. This is just the maximum level of customization of appearance possible; such design totally goes away from dependency on Windows and presents pure "WPF-only" UI. For certain (maybe rather exotic) types of UI, this is the very best.
—SA