Skip to content
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

The system context menu is always shown in a MetroWindow Icon starting with alpha0490 #4488

Open
darbid opened this issue May 18, 2024 · 0 comments
Labels

Comments

@darbid
Copy link

darbid commented May 18, 2024

Describe the bug

Starting with alpha0490 the system context menu (with restore, move, close etc) is always shown as the context menu when creating a MetroWindow.IconTemplate. If the window is maximized then upon right clicking the Icon the system menu is shown and then on top the custom context menu from a MetroWindow.IconTemplate

Steps to reproduce

In a any metro window add the template code for the IconTemplate

<mah:MetroWindow.IconTemplate>
    <DataTemplate>
        <Grid Width="30"
              Background="Red">
            <Grid.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Test1" />
                    <MenuItem Header="Test2" />
                </ContextMenu>
            </Grid.ContextMenu>
        </Grid>
    </DataTemplate>
</mah:MetroWindow.IconTemplate>

Expected behavior

Upon right clicking the red grid (see images below) the context menu Test1 and Test2 appear.

Actual behavior

A maximized window shows both the Windows system context menu and the above Grid context menu.
A non-maximized window shows only the Windows system context menu

alpha0476 does not have this behavior

Environment

MahApps.Metro version: v3.0.0 alpha0490 and alpha0492
Windows build number: Win10 OSBuild 19045.4291
Visual Studio:  2022 17.9.6
Target Framework: .Net 8

Screenshots

Not Maximized
Capture

Maximized
Capture1

@darbid darbid added the Bug label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant