The answer by Wayne and a good solution suggested by Simon require some explanation.
The title bar with window border is called
non-client area. If is only accessible by WPF through standard window properties. You cannot render anything in this area. Actually, WPF has very little to do with Windows API; it is based on ActiveX and is not pumping Windows messages, does not use windows handles and other related stuff. It only uses a Windows window as a container. This is explained here:
http://msdn.microsoft.com/en-us/library/ms750441.aspx[
^].
Now, you can work with non-client area using P/Invoke and raw Window API. This is pretty bad, as the whole idea of WPF is to go away from Windows. Potentially, this foundation is very platform-independent.
I think much better way is to
get rid of non-client area at all and simulate missing control elements withing the client area. To do that, you can use the property
System.Windows.Window.WindowStyle
with the value of
System.Windows.WindowStyle.None
. See:
http://msdn.microsoft.com/en-us/library/system.windows.window.windowstyle.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.windowstyle.aspx[
^].
This way is not so impractical as one could think. This is actually the way to achieve maximum possible window customization and style independence of platform and environment — a blessing for some kinds of application styles.
—SA