After Upgrading to VS 2022 version 17.9.0, ToggleMenuFlyoutItem tapped event no longer fires. #9357
Labels
area-Flyouts
needs-triage
Issue needs to be triaged by the area owners
team-CompInput
Issue for IXP (Composition, Input) team
Describe the bug
My project contains numerous command bars that consist of various AppBarButtons.
Some of the AppBarButtons use a MenuFlyout to display options in the form of ToggleMenuFlyOutItems
When the user taps the AppBarButton, the MenuFlyout displays the ToggleMenuFlyoutItems.
Then tapping the ToggleMenuFLyoutItems will fire its tapped event handler.
Since upgrading to VS 17.9.0, this tapped event is no longer fired.
Steps to reproduce the bug
I am including a very simple project displaying the issue.
The project has a command bar as a child of the main page's StackPanel.
At start up, the project will create an AppBarButton and add a MenuFlyout with 3 ToggleMenuFlyoutItems.
Each ToggleMenuFlyoutItem tapped event handler is wired up to point to the same event handler.
The AppBarButton is then added to the CommandBar's PrimaryCommands' collection.
When the project starts up, the AppBar button is displayed in the CommandBar.
Clicking the AppBarButton displays the ToggleMenuFlyoutItems.
However, clicking a ToggleMenuFlyoutItem does not fire the tapped event handler.
This is confirmed by placing a break point within the event handler, which is never hit.
Expected behavior
The ToggleMenuFlyoutItem event handler should fire each time a ToggleMenuFlyoutItem is tapped.
Screenshots
Project main screen showing AppBarButton within CommandBar
Tapping AppBarButton displays ToggleMenuFlyoutItems
Breakpoint never reached
VS Details
NuGet package version
None
Packaging type
No response
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022
Additional context
Attaching sample project
CommandBarEventHandler.zip
The text was updated successfully, but these errors were encountered: