Skip to content
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

Click events do not work on PopupMenu mode #109

Open
KarelChanivecky opened this issue Sep 15, 2023 · 0 comments
Open

Click events do not work on PopupMenu mode #109

KarelChanivecky opened this issue Sep 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@KarelChanivecky
Copy link

Describe the bug

I was not able to get Click events triggered in PopupMenu mode.

Win App R v1.3.3, or 1.4

Using the Command property the same behaviour can be achieved. Added description on how to use in the readme, so it is easy for others to use the ICommand method as an alternative

Steps to reproduce the bug

  <tb:TaskbarIcon
  x:Name="TrayIcon"
  x:FieldModifier="public"
  IconSource="ms-appx:///Assets/Red.ico"
  ToolTipText="ToolTip"
  NoLeftClickDelay="True"
  ContextMenuMode="PopupMenu"
  >
      <tb:TaskbarIcon.ContextFlyout>
          <MenuFlyout AreOpenCloseAnimationsEnabled="False">
              <MenuFlyoutItem Click="ShowWindow" Text="Show Window" />
              <MenuFlyoutSeparator />
              <MenuFlyoutItem Click="ExitApplication" Text="Exit" />
          </MenuFlyout>
      </tb:TaskbarIcon.ContextFlyout>
  </tb:TaskbarIcon>
2. In the xaml.cs define an appropriate event handler for the events 3. Run the app and click the menu

Expected behavior

The events are triggered

Screenshots

No response

NuGet package version

No response

Platform

WinUI

IDE

Visual Studio 2022

Windows Version

Windows 10

WindowsAppSDK Version

Other

WindowsAppSDK Type

Unpackaged

Manifest

No response

Additional context

No response

@KarelChanivecky KarelChanivecky added the bug Something isn't working label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant