wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

ContextMenu Styling in Windows 10 20H2 not working

Open janbloemacher opened this issue 4 years ago • 4 comments

Describe the bug
Context Menu styling on Windows 10 20H2 is broken. (Running this build in a corporate environment)

Expected behavior
Styling to be the same as in the systray context menu.

Screenshots
ContextMenu in the Demo-App image

ContextMenu in the Demo-App's systray icon image

Desktop (please complete the following information):

  • OS: Windows 10 20H2
  • .NET: net6.0-windows
  • Version: Latest stable 1.2.1

Additional context
The issue happens in my own app as well as in the demo-app. I added the Added the ResourceDictionary

<ResourceDictionary Source="pack://application:,,,/WPFUI;component/Styles/Theme/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFUI;component/Styles/WPFUI.xaml" />
</ResourceDictionary.MergedDictionaries>

Applied the style to my Mainwindow Style="{DynamicResource UiWindow}"

janbloemacher avatar Feb 22 '22 10:02 janbloemacher

As far as I can see, styling doesn't work because it doesn't exist in this lib

MajorXAML avatar Feb 25 '22 07:02 MajorXAML

As far as I can see, styling doesn't work because it doesn't exist in this lib

Then the question is, why is the styling broken if the lib doesn't override / use context menu styling. As you can see in the first screenshot there's this weird vertical line. I'll see what the context menu looks like on a windows 11 machine.

edit Also happens on windows 11 machine. image

janbloemacher avatar Feb 25 '22 09:02 janbloemacher

The reason for this is that MenuItem style is overridden in Menu.xaml.

jz5 avatar Mar 01 '22 23:03 jz5

Should be better image

pomianowski avatar Mar 13 '22 00:03 pomianowski