Fix context menu background not following dark theme#131
Draft
Fix context menu background not following dark theme#131
Conversation
3 tasks
…ned event Agent-Logs-Url: https://github.com/Jack251970/ContextMenuManager/sessions/cbe17214-8b94-400b-82dc-127148fffcc3 Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix context menu background color not changing with theme
Fix context menu background not following dark theme
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WPF
ContextMenupopups open via aPopupRootwithInheritanceBehavior.SkipAllNext, which severs propagation of iNKORE.UI.WPF.Modern's inheritableThemeProperty. As a result, all context menus rendered light regardless of the application theme.Changes
App.xaml.cs: Register a class-level handler forContextMenu.OpenedEventthat explicitly callsThemeManager.SetRequestedThemewith the current application theme on every context menu open. This injects the correct theme resources directly into the context menu'sResourceDictionary, covering both gear-button and right-click menus, and handles runtime theme switches.