Skip to content

Add TrayIconFlyoutPopupDirection enum for popup control - #9

Closed
Jack251970 wants to merge 3 commits into
0x5bfa:mainfrom
Jack251970:TrayIconFlyoutPopupDirection
Closed

Add TrayIconFlyoutPopupDirection enum for popup control#9
Jack251970 wants to merge 3 commits into
0x5bfa:mainfrom
Jack251970:TrayIconFlyoutPopupDirection

Conversation

@Jack251970

Copy link
Copy Markdown
Contributor

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

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.
Copilot AI review requested due to automatic review settings February 22, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown

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 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 TrayIconFlyoutPopupDirection enum 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.

Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
Comment thread samples/TrayIconFlyout.Wasdk.Sample.App/RootViewModel.cs Outdated
Comment thread samples/TrayIconFlyout.Wasdk.Sample.App/RootViewModel.cs Outdated
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
Comment thread src/TrayIconFlyout.Shared/TrayIconFlyout.cs Outdated
0x5bfa and others added 2 commits March 11, 2026 02:24
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.
@Jack251970

Copy link
Copy Markdown
Contributor Author

@0x5bfa Resolved all reviewers from Copilot

@0x5bfa

0x5bfa commented May 15, 2026

Copy link
Copy Markdown
Owner

I have superseded this PR by adding this enum:

https://github.com/0x5bfa/TrayIconFlyout/blob/4cf48f7bc3b7d9f542fbb759cb3c803c14757f64/src/TrayIconFlyout.Shared/Helpers/TrayIconFlyoutPopupDirection.cs#L6-L14

@0x5bfa 0x5bfa closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Changing popup direction at runtime doesn't work

3 participants