HavenDV / H.NotifyIcon

TrayIcon for WPF/WinUI/Uno/MAUI
MIT License
563 stars 46 forks source link

Bug title #148

Open buzzbonner opened 7 months ago

buzzbonner commented 7 months ago

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.

HavenDV commented 7 months ago

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

buzzbonner commented 7 months ago

many thanks!!

On Sat, Mar 30, 2024 at 11:27 AM Konstantin S. @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/HavenDV/H.NotifyIcon/issues/148#issuecomment-2028019624, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUPFGEQSQF76TTZG3IGUSLY22OS5AVCNFSM6AAAAABFNC4LJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGAYTSNRSGQ . You are receiving this because you authored the thread.Message ID: @.***>