Skip to content

Added the context menu for the tab view for left and right actions. - #1821

Merged
sabareesanms merged 2 commits into
mainfrom
user/sabareesanms/Bug_52757718_Single_Pointer_Method_For_TabView
Mar 31, 2025
Merged

sabareesanms merged 2 commits into
mainfrom
user/sabareesanms/Bug_52757718_Single_Pointer_Method_For_TabView

Conversation

@sabareesanms

Copy link
Copy Markdown
Contributor

Bug 52757718 Lack of Alternative Single Pointer Method for Tab Movement in TabView Screen.

Fix - Adding context menu for the TabView example in the WinUI Gallery which allows the tabs to be moved left and right with single click in addition to the dragging method.

Testing - Tested in the WinUI Gallery app.

Screenshots

Screenshot 2025-03-27 123727

Changes

  1. WinUIGallery/Helpers/TabViewHelper.cs - Added a function PopulateTabViewContextMenu(MenuFlyout contextMenu)
  • Gets the parent tab view and tab view item of the context menu.
  • Add left move menu if index > 0 with its action (Adds except 1st item)
  • Add right move menu if index < count -1 (Adds except last item)
  • Closes the menu if the context menu is empty (To avoid empty context menu showing).
  1. WinUIGallery/Samples/ControlPages/TabViewPage.xaml
  • Defines the context menu TabViewContextMenu in page resource for reusability
  • Adds the context menu to all tabviewitem in the example page.
  1. WinUIGallery/Samples/ControlPages/TabViewPage.xaml.cs
  • Added the event handler for the context menu opening event to populate the context menu with the tab view helper function
Comment thread WinUIGallery/Helpers/TabViewHelper.cs Outdated
Comment thread WinUIGallery/Helpers/TabViewHelper.cs
Comment thread WinUIGallery/Helpers/TabViewHelper.cs
Comment thread WinUIGallery/Helpers/TabViewHelper.cs Outdated
Comment thread WinUIGallery/Helpers/TabViewHelper.cs Outdated
Comment thread WinUIGallery/Helpers/TabViewHelper.cs Outdated
@sabareesanms
sabareesanms enabled auto-merge (squash) March 28, 2025 10:21
@Hemantxk

Copy link
Copy Markdown

/azp run

1 similar comment
@ayushjai30

Copy link
Copy Markdown
Contributor

/azp run

@Saharsh979

Copy link
Copy Markdown

I see that the pipeline is failing because of missing dependencies, turns out we were looking for a newer version of some package which was not there on the feed. Have updated the feed now!

@Saharsh979

Copy link
Copy Markdown

/azp run

@sabareesanms
sabareesanms merged commit 70237d9 into main Mar 31, 2025
@sabareesanms
sabareesanms deleted the user/sabareesanms/Bug_52757718_Single_Pointer_Method_For_TabView branch March 31, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants