You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System.Diagnostics;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls.Primitives;
using CommunityToolkit.Mvvm.Input;
using H.NotifyIcon.Core;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace H_Notify_WinUi
{
/// <summary>
/// An empty window that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
TrayIconFoo.PopupActivation = PopupActivationMode.LeftClick;
TrayIconFoo.ContextFlyout.ShowMode = FlyoutShowMode.Transient;
}
private void myButton_Click(object sender, RoutedEventArgs e)
{
myButton.Content = "Clicked";
}
[RelayCommand]
private void DoSomething()
{
TrayIconFoo.ContextFlyout.Hide();
TrayIconFoo.CloseTrayPopup();
Menu.Hide();
Debug.WriteLine("Fooooooooo");
}
}
}
How do I hide the opened menu when the task bar icon was clicked?
The text was updated successfully, but these errors were encountered:
Hi. Thank you for raising the issue. Since the development of this, a whole series of new versions of WindowsAppSdk have been released, and I think I need to fix this for the current version
Discussed in #143
Originally posted by TRadigk March 2, 2024
Hi,
consider following xaml for a window (from base Winui project):
with following code behind:
How do I hide the opened menu when the task bar icon was clicked?
The text was updated successfully, but these errors were encountered: