WPF Borderless Window issues: Aero Snap & Maximizing

前端 未结 6 1625
独厮守ぢ
独厮守ぢ 2020-12-03 03:37

I\'ve created a borderless WPF window by setting the following window properties in XAML:

... WindowStyle=\"None\" AllowsTransparency=\"True\" ...

6条回答
  •  日久生厌
    2020-12-03 04:24

    For Point number 5, use this:

    public WindowName() // Constructor for your window
    {
    this.MaxHeight = SystemParameters.WorkArea.Height;
    this.MaxWidth = SystemParameters.WorkArea.Width;
    }
    

    This will ensure that the window will not overlap the taskbar when maximized.

提交回复
热议问题