New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong window maximize on two monitor systems. #2832

Closed
chuuddo opened this Issue Feb 2, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@chuuddo
Contributor

chuuddo commented Feb 2, 2017

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
@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Feb 2, 2017

Member

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

Member

punker76 commented Feb 2, 2017

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

@chuuddo

This comment has been minimized.

Show comment
Hide comment
@chuuddo

chuuddo Feb 2, 2017

Contributor

@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>
Contributor

chuuddo commented Feb 2, 2017

@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>
@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Feb 2, 2017

Member

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

Member

punker76 commented Feb 2, 2017

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

@chuuddo

This comment has been minimized.

Show comment
Hide comment
@chuuddo

chuuddo Feb 2, 2017

Contributor

@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

Contributor

chuuddo commented Feb 2, 2017

@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

@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Feb 2, 2017

Member

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

Member

punker76 commented Feb 2, 2017

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

@chuuddo

This comment has been minimized.

Show comment
Hide comment
@chuuddo

chuuddo Feb 2, 2017

Contributor

@punker76 it works fine, like in 1.4.1!

Contributor

chuuddo commented Feb 2, 2017

@punker76 it works fine, like in 1.4.1!

@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Feb 2, 2017

Member

@chuuddo Thx for clarifying the problem and testing!

Member

punker76 commented Feb 2, 2017

@chuuddo Thx for clarifying the problem and testing!

@punker76 punker76 self-assigned this Feb 2, 2017

@punker76 punker76 added the Bug label Feb 2, 2017

@punker76 punker76 added this to the 1.4.3 milestone Feb 2, 2017

@BornToBeRoot

This comment has been minimized.

Show comment
Hide comment
@BornToBeRoot

BornToBeRoot Feb 2, 2017

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 😄

BornToBeRoot commented Feb 2, 2017

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 😄

@punker76

This comment has been minimized.

Show comment
Hide comment
@punker76

punker76 Feb 2, 2017

Member

@BornToBeRoot this evening (de)

Member

punker76 commented Feb 2, 2017

@BornToBeRoot this evening (de)

@punker76 punker76 closed this Feb 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment