Add TrayIconFlyoutPopupDirection enum for popup control - #9
Closed
Jack251970 wants to merge 3 commits into
Closed
Conversation
Replaced Orientation with TrayIconFlyoutPopupDirection for popup direction, enabling Up, Down, Left, and Right options. Updated properties, dictionaries, and animation logic in RootViewModel and TrayIconFlyout to use the new enum. Added GetTranslateTransformInfo helper and included the enum file in the project. Animation now supports all four directions.
There was a problem hiding this comment.
Pull request overview
This pull request replaces the Orientation enum with a new TrayIconFlyoutPopupDirection enum to fix a bug where the popup direction could not work when changing from vertical to horizontal orientation. The new enum provides four explicit directions (Up, Down, Left, Right) instead of the previous two orientations (Vertical, Horizontal), enabling more precise control over popup animation behavior.
Changes:
- Introduced
TrayIconFlyoutPopupDirectionenum with Up, Down, Left, and Right values - Updated animation logic to support all four directions with proper transform calculations
- Added caching mechanism to preserve popup direction and placement during animations
- Updated sample app to demonstrate all four popup directions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/TrayIconFlyout.Shared/TrayIconFlyoutPopupDirection.cs | New enum defining four popup directions (Up, Down, Left, Right) |
| src/TrayIconFlyout.Shared/TrayIconFlyout.cs | Updated animation logic with new helper method and direction caching; added support for all four directions |
| src/TrayIconFlyout.Shared/TrayIconFlyout.Properties.cs | Changed PopupDirection property type from Orientation to TrayIconFlyoutPopupDirection |
| src/TrayIconFlyout.Shared/TrayIconFlyout.Shared.projitems | Added new enum file to project compilation |
| samples/TrayIconFlyout.Wasdk.Sample.App/RootViewModel.cs | Updated dictionary to use new enum type and initialized with all four directions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add logic to handle flyout open/close when animation storyboard is unavailable. Directly updates IsOpen and _isPopupAnimationPlaying flags, and ensures window visibility is updated when hiding.
Contributor
Author
|
@0x5bfa Resolved all reviewers from Copilot |
Owner
|
I have superseded this PR by adding this enum: |
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.
Replaced Orientation with TrayIconFlyoutPopupDirection for popup direction, enabling Up, Down, Left, and Right options. Updated properties, dictionaries, and animation logic in RootViewModel and TrayIconFlyout to use the new enum. Added GetTranslateTransformInfo helper and included the enum file in the project. Animation now supports all four directions.
Resolve #3