-
-
Notifications
You must be signed in to change notification settings - Fork 47
Trayicon refactoring #243
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
Trayicon refactoring #243
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the tray icon functionality in WinUIEx by introducing a new dedicated TrayIcon class to replace the previous integrated approach within WindowManager. The refactoring improves maintainability and provides a more focused API for tray icon management.
- Replaces unified
TrayIconInvokedevent with separateLeftClickandRightClickevents for cleaner event handling - Introduces new
TrayIconclass that encapsulates all tray icon functionality and flyout management - Deprecates legacy Icon-related APIs in favor of the newer AppWindow.SetTaskbarIcon approach
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/WinUIExSample/MainWindow.xaml.cs | Updates sample to use new separate click events instead of unified tray icon event |
| src/WinUIEx/WindowManager.cs | Removes legacy tray icon implementation and struct definitions |
| src/WinUIEx/WindowManager.TrayIcon.cs | Replaces complex tray icon logic with delegation to new TrayIcon class |
| src/WinUIEx/WindowExtensions.cs | Marks SetTaskBarIcon extension method as obsolete |
| src/WinUIEx/WindowEx.cs | Marks TaskBarIcon property as obsolete |
| src/WinUIEx/TrayIcon.cs | Adds new comprehensive TrayIcon class with full functionality |
| src/WinUIEx/Interop.cs | Moves reusable interop structures and adds Shell_NotifyIconGetRect import |
| src/WinUIEx/Icon.cs | Marks entire Icon class as obsolete |
| src/WinUIEx/HwndExtensions.cs | Marks SetTaskBarIcon method as obsolete |
Comments suppressed due to low confidence (1)
src/WinUIEx/TrayIcon.cs:1
- The method parameter
tooltipis checked but the instance field_tooltipis used in the loop. This causes the tooltip parameter to be ignored when it's provided.
using Microsoft.UI;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.