【问题标题】:Remove title bar text of a WPF window but keep status bar text删除 WPF 窗口的标题栏文本但保留状态栏文本
【发布时间】:2015-09-13 00:53:18
【问题描述】:

我正在使用 Metro Window 在 Wpf 中工作,是否可以创建一个在任务栏中有文本但在应用程序顶部的标题栏中没有文本的窗口?
目前我正在使用<Controls:MetroWindow.LeftWindowCommands><Controls:MetroWindow.RightWindowCommands> 来自定义我的标题栏。我附上了没有标题文字的图片。。
下面的图片有标题。
现在我的要求是,我的应用程序是否可以像图像 1 和任务栏中的第 4 个图像一样

感谢大家的帮助。

【问题讨论】:

    标签: c# wpf mahapps.metro


    【解决方案1】:

    尝试 PInvoke 方法。

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

    在加载的窗口上:

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

    【讨论】:

      猜你喜欢
      • 2010-10-17
      • 2012-02-13
      • 2010-09-16
      • 2016-10-26
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 2014-11-01
      • 2014-01-19
      相关资源
      最近更新 更多