Skip to content

Cannot fully programatically maximize window. #1823

@pingu2k4

Description

@pingu2k4

Hi,

Having this live of code called: this.WindowState = System.Windows.WindowState.Maximized;

does change the size of the window, however there are borders all around the window, where the window isn't touching the edge of the screen or the taskbar. Here is my opening window tag:

    <Controls:MetroWindow x:Name="GameWindow" x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                      ShowMinButton="False"
                      ShowMaxRestoreButton="False"
                      ResizeMode="NoResize"
                      SaveWindowPosition="True"
        Title="MainWindow" Height="350" Width="525" GlowBrush="#FF07908E" Background="#FF252525"
                      WindowState="Maximized"
                      IgnoreTaskbarOnMaximize="True">

Effectively, I want to come out of fullscreen as it is set to when it launches, and have it take up all the screen but not cover the taskbar... Which it does apart from it leaves this strange gap around....

2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions