diff --git a/src/Avalonia.Controls/TrayIcon.cs b/src/Avalonia.Controls/TrayIcon.cs
index bdfea40b5e..73f1fcb006 100644
--- a/src/Avalonia.Controls/TrayIcon.cs
+++ b/src/Avalonia.Controls/TrayIcon.cs
@@ -71,11 +71,13 @@ namespace Avalonia.Controls
{
foreach(var icon in icons)
{
- icon.Remove();
+ icon.Dispose();
}
}
-
+ ///
+ /// Defines the attached property.
+ ///
public static readonly AttachedProperty TrayIconsProperty
= AvaloniaProperty.RegisterAttached("TrayIcons");
@@ -85,29 +87,22 @@ namespace Avalonia.Controls
public static readonly StyledProperty IconProperty =
Window.IconProperty.AddOwner();
-
+ ///
+ /// Defines the property.
+ ///
public static readonly StyledProperty ToolTipTextProperty =
AvaloniaProperty.Register(nameof(ToolTipText));
///
- /// Defines the property.
+ /// Defines the property.
///
public static readonly StyledProperty IsVisibleProperty =
Visual.IsVisibleProperty.AddOwner();
- private bool _disposedValue;
public static void SetTrayIcons(AvaloniaObject o, TrayIcons trayIcons) => o.SetValue(TrayIconsProperty, trayIcons);
public static TrayIcons GetTrayIcons(AvaloniaObject o) => o.GetValue(TrayIconsProperty);
- ///
- /// Removes the notify icon from the taskbar notification area.
- ///
- public void Remove()
- {
-
- }
-
public new ITrayIconImpl PlatformImpl => _impl;
@@ -158,6 +153,9 @@ namespace Avalonia.Controls
}
}
+ ///
+ /// Disposes the tray icon (removing it from the tray area).
+ ///
public void Dispose() => _impl.Dispose();
}
}