2015-06-26 52 views
5

我在Wpf中使用metro窗口工作,是否可以創建一個窗口,其中包含任務欄中的文本,但頂部標題欄中沒有文本的應用程序?
目前我使用<Controls:MetroWindow.LeftWindowCommands><Controls:MetroWindow.RightWindowCommands>來定製我的標題欄。我附加了圖片,沒有標題文字。 enter image description hereenter image description here
而下面的圖片有標題。現在 enter image description hereenter image description here
我的要求是,我的應用程序看起來像在圖像1和任務欄看起來像4圖像刪除WPF窗口的標題欄文本,但保留狀態欄文本

感謝您的幫助所有。

回答

3

嘗試PInvoke方法。

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

在窗口已加載:

SetWindowText(new WindowInteropHelper(this).Handle, "Madan");