Class TrayIcon
public class TrayIcon : AvaloniaObject, INotifyPropertyChanged, INativeMenuExporterProvider, IDisposable
- Inheritance
-
TrayIcon
- Implements
- Inherited Members
Constructors
TrayIcon()
public TrayIcon()
Fields
CommandParameterProperty
Defines the CommandParameter property.
public static readonly StyledProperty<object?> CommandParameterProperty
Field Value
CommandProperty
Defines the Command property.
public static readonly StyledProperty<ICommand?> CommandProperty
Field Value
IconProperty
Defines the Icon property.
public static readonly StyledProperty<WindowIcon?> IconProperty
Field Value
IconsProperty
Defines the TrayIcons attached property.
public static readonly AttachedProperty<TrayIcons?> IconsProperty
Field Value
IsVisibleProperty
Defines the IsVisible property.
public static readonly StyledProperty<bool> IsVisibleProperty
Field Value
MenuProperty
Defines the Menu property.
public static readonly StyledProperty<NativeMenu?> MenuProperty
Field Value
ToolTipTextProperty
Defines the ToolTipText property.
public static readonly StyledProperty<string?> ToolTipTextProperty
Field Value
Properties
Command
Gets or sets the Command property of a TrayIcon.
public ICommand? Command { get; set; }
Property Value
CommandParameter
public object? CommandParameter { get; set; }
Property Value
Icon
Gets or sets the icon of the TrayIcon.
public WindowIcon? Icon { get; set; }
Property Value
IsVisible
Gets or sets the visibility of the TrayIcon.
public bool IsVisible { get; set; }
Property Value
Menu
Gets or sets the Menu of the TrayIcon.
public NativeMenu? Menu { get; set; }
Property Value
NativeMenuExporter
public INativeMenuExporter? NativeMenuExporter { get; }
Property Value
ToolTipText
Gets or sets the tooltip text of the TrayIcon.
public string? ToolTipText { get; set; }
Property Value
Methods
Dispose()
Disposes the tray icon (removing it from the tray area).
public void Dispose()
GetIcons(Application)
public static TrayIcons? GetIcons(Application o)
Parameters
Returns
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
SetIcons(Application, TrayIcons?)
public static void SetIcons(Application o, TrayIcons? trayIcons)
Parameters
o
ApplicationtrayIcons
TrayIcons
Events
Clicked
Raised when the TrayIcon is clicked. Note, this is only supported on Win32 and some Linux DEs, on OSX this event is not raised.
public event EventHandler? Clicked