fix(tray): System tray right-click Menu not displaying#1497
Merged
pomianowski merged 11 commits intolepoco:mainfrom Nov 7, 2025
joesdu:main
Merged
fix(tray): System tray right-click Menu not displaying#1497pomianowski merged 11 commits intolepoco:mainfrom joesdu:main
Menu not displaying#1497pomianowski merged 11 commits intolepoco:mainfrom
joesdu:main
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the system tray right-click menu was not displaying properly by improving menu positioning and data context handling.
Key changes:
- Modified menu placement to use direct property setting instead of ContextMenuService
- Added data context synchronization between NotifyIcon and its ContextMenu
- Fixed property assignment to use the internal manager instead of the control itself
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/Wpf.Ui.Tray/Internal/InternalNotifyIconManager.cs |
Updated menu placement logic to use direct property setting for better positioning |
src/Wpf.Ui.Tray/Controls/NotifyIcon.cs |
Added data context synchronization, fixed property assignments, and improved menu initialization |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
+1 |
chucker
reviewed
Aug 24, 2025
Collaborator
Probably not the one you meant to link? |
Commented out the line that updates Menu's DataContext to prevent potential issues.
Contributor
Author
There are two issues mentioned in this issue, which were not mentioned separately at the time, so the names of the issues are a bit inconsistent. |
Contributor
Open
Menu not displaying
pomianowski
approved these changes
Nov 7, 2025
This was referenced Nov 24, 2025
This was referenced Dec 2, 2025
This was referenced Dec 22, 2025
This was referenced Dec 29, 2025
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.
Fix system tray right-click menu not displaying
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: [#1490 ]
What is the new behavior?
Other information