Skip to content

Commit

Permalink
Surface the TrayIcon Guid in TaskbarIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Difegue authored and HavenDV committed Jul 9, 2024
1 parent f13d1bb commit 8013e9c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libs/H.NotifyIcon.Shared/TaskbarIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ public partial class TaskbarIcon : FrameworkElement
[SupportedOSPlatform("windows5.1.2600")]
public bool IsCreated => TrayIcon.IsCreated;

/// <summary>
/// Unique ID. <br/>
/// It will be used by the system to store your TrayIcon settings,
/// so it is recommended to make it fixed and unique for each application TrayIcon, not random.
/// </summary>
/// <remarks>
/// Note: Windows associates a Guid with the path of the binary, so you must use the new Guid when you change the path.
/// </remarks>
[SupportedOSPlatform("windows5.1.2600")]
public Guid? IsCreated => IsCreated ? TrayIcon.Id : null;

#endregion

#region Constructors
Expand Down

0 comments on commit 8013e9c

Please sign in to comment.