Mahapps.metro: Wrong window maximize on two monitor systems.

Created on 2 Feb 2017  路  9Comments  路  Source: MahApps/MahApps.Metro

What steps will reproduce this issue?

I have two monitors and after update from v1.4.1 to v1.4.2 window maximizing start ignore taskbar with z-order behind tasbar (see screenshots). On one monitor systems this issue not reproduced.

v.1.4.1 two monitors maximized window.
screenshot_1

v.1.4.2 two monitors maximized window.
screenshot_2

Expected outcome

Window maximizing should work same on any number of monitors

--

Environment

  • MahApps.Metro __v1.4.2__
  • Windows __7__
  • Visual Studio __2015__
  • .NET Framework __4.5.1__
Bug

Most helpful comment

@punker76 it works fine, like in 1.4.1!

All 9 comments

@chuuddo your screenshots seems to be the same? Damn, maybe I fixed to much...

@punker76 look at ActualHeight on screenshots. If maximized right it should be 1080-TaskbarHeight on FullHD resolution.

Code of window on screenshots.

<controls:MetroWindow x:Class="MahappsTest.MainWindow"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:local="clr-namespace:MahappsTest"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      Title="MainWindow"
                      Width="525"
                      Height="350"
                      WindowStartupLocation="CenterScreen"
                      mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" VerticalAlignment="Bottom">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding ActualWidth, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:MetroWindow}}}" />
                <TextBlock Text="x" />
                <TextBlock Text="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:MetroWindow}}}" />
            </StackPanel>
        </Grid>
        <StatusBar Grid.Row="1" Height="70" />
    </Grid>
</controls:MetroWindow>

@chuuddo OK, but in both screenshots the maximization is wrong...

@punker76 dont understand why maximization is wrong on both sreenshots.
I think in 1.4.1 maximization work right. All screenshots made on two monitor system.
screenshot_5
screenshot_6
screenshot_7

@chuuddo Can you try this one? I think I optimized to much in last release 馃榿
MahApps.Metro.zip

@punker76 it works fine, like in 1.4.1!

@chuuddo Thx for clarifying the problem and testing!

When will you release 1.4.3 ? This happens on systems with 1 Monitor too.

I dont want to go back to 1.4.1 :smile:

@BornToBeRoot this evening (de)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StickNitro picture StickNitro  路  11Comments

yousufctec picture yousufctec  路  10Comments

AndrzejKl picture AndrzejKl  路  12Comments

webprofusion-chrisc picture webprofusion-chrisc  路  11Comments

punker76 picture punker76  路  30Comments