We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MenuFlyoutName.Items.Add(new MenuFlyoutItem() { Text = "new added" });
changing MenuFlyou.Items doesn't change context menu If set ContextMenuMode=PopupMenu or ActiveWindow, context menu does change.
change H.NotifyIcon.Apps.WinUI project TrayIconView.xaml
<tb:TaskbarIcon x:Name="TrayIcon" x:FieldModifier="public" IconSource="ms-appx:///Assets/Red.ico" ToolTipText="ToolTip" LeftClickCommand="{x:Bind ShowHideWindowCommand}" NoLeftClickDelay="True" ContextMenuMode="SecondWindow" > <tb:TaskbarIcon.ContextFlyout> <!-- Changes here --> <MenuFlyout AreOpenCloseAnimationsEnabled="False" x:Name="Menu"> <MenuFlyoutItem Command="{x:Bind AddCommand}" Text="Add Item" /> <!-- Changes here --> <MenuFlyoutItem Command="{x:Bind ShowHideWindowCommand}" Text="Show/Hide Window" /> <MenuFlyoutSeparator /> <MenuFlyoutItem Command="{x:Bind ExitApplicationCommand}" Text="Exit" /> </MenuFlyout> </tb:TaskbarIcon.ContextFlyout> </tb:TaskbarIcon>
TrayIconView.xaml.cs
[RelayCommand] public void Add() { Menu.Items.Add(new MenuFlyoutItem() { Text = "new added" }); }
Then click "Add Item"
Like PopupMenu mode, A new Item was Added
No response
2.0.108
WinUI
Visual Studio 2022
Windows 11
Other
Packaged
The text was updated successfully, but these errors were encountered:
The reason is that the real working MenuFlyout(and it's Items) is the second transparent window's property. Items in xaml is just for preparation.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
changing MenuFlyou.Items doesn't change context menu
If set ContextMenuMode=PopupMenu or ActiveWindow, context menu does change.
Steps to reproduce the bug
change H.NotifyIcon.Apps.WinUI project
TrayIconView.xaml
TrayIconView.xaml.cs
Then click "Add Item"
Expected behavior
Like PopupMenu mode, A new Item was Added
Screenshots
No response
NuGet package version
2.0.108
Platform
WinUI
IDE
Visual Studio 2022
Windows Version
Windows 11
WindowsAppSDK Version
Other
WindowsAppSDK Type
Packaged
Manifest
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: