From 59e66f72f2a681dcf5cd69118bf94215bc9fab82 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 10 Sep 2021 11:39:22 +0100 Subject: [PATCH] add some documentation. --- src/Avalonia.Controls/TrayIcon.cs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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(); } }