Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove title bar text of a WPF window but keep status bar text

I am working in Wpf with metro Window, is it possible to create a window which has text in the taskbar, but has no text in the title bar at the top of the application?
Currently I am using <Controls:MetroWindow.LeftWindowCommands> and <Controls:MetroWindow.RightWindowCommands> for customize my title bar. I have attached images, that doesn't have title text.enter image description hereenter image description here.
And below images have title. enter image description hereenter image description here
Now my requirement is that can my application looks like in image 1 and looks like 4th image in task bar

Thanks for your help all.

like image 308
madan Avatar asked Oct 19 '22 08:10

madan


1 Answers

Try PInvoke Method.

[DllImport("user32.dll")]
    static extern int SetWindowText(IntPtr hWnd, string text);

On Window Loaded :

SetWindowText(new WindowInteropHelper(this).Handle, "Madan");
like image 75
Bhavesh Jain Avatar answered Oct 22 '22 01:10

Bhavesh Jain