2015-06-26 48 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");