HavenDV/H.NotifyIcon

Bug title

Opened this issue · 2 comments

Describe the bug

I'm tring to change the icon at runtime, but it's not working?

Steps to reproduce the bug

  1. Change the binding in MainPage.xaml to -> IconSource="{Binding TaskbarIcon}"
  2. Update MainPage.cs to support new property -> public ImageSource TaskbarIcon { get; set; } = ImageSource.FromFile("test.icon");
  3. Change the TaskbarIcon property at runtime

Expected behavior

See the TaskbarIcon change based on the property value

Screenshots

No response

NuGet package version

2.0.124

Platform

No response

IDE

No response

Windows Version

Windows 10

WindowsAppSDK Version

No response

WindowsAppSDK Type

None

Manifest

No response

Additional context

This is happening in Maui when using Windows only.

The first thing you need to do is make sure that you send an INotifyPropertyChanged with the name of that property when it changes. This can be either using the [ObservableProperty] attribute for CommunityToolkit.Mvvm, or manually for classes that implement INotifyPropertyChanged