Skip to main content

TrayIcon Class

Definition

Assembly:Avalonia.Controls
Package:Avalonia
public class TrayIcon

Inheritance: object -> AvaloniaObject -> TrayIcon

Implements: INativeMenuExporterProvider, IDisposable

Constructors

NameDescription
TrayIconNo summary available.

TrayIcon Constructor

public TrayIcon()

Methods

NameDescription
DisposeDisposes the tray icon (removing it from the tray area).
GetIconsNo summary available.
SetIconsNo summary available.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

Dispose Method

Disposes the tray icon (removing it from the tray area).

public void Dispose()

GetIcons Method

public Avalonia.Controls.TrayIcons GetIcons(Avalonia.Application o)

Parameters

o Avalonia.Application

Returns

Avalonia.Controls.TrayIcons

SetIcons Method

public void SetIcons(Avalonia.Application o, Avalonia.Controls.TrayIcons trayIcons)

Parameters

o Avalonia.Application

trayIcons Avalonia.Controls.TrayIcons

Properties

NameDescription
CommandGets or sets the Avalonia.Controls.TrayIcon.Command property of a TrayIcon.
CommandParameterGets or sets the parameter to pass to the Avalonia.Controls.TrayIcon.Command property of a Avalonia.Controls.TrayIcon.
IconGets or sets the icon of the TrayIcon.
IsVisibleGets or sets the visibility of the TrayIcon.
MenuGets or sets the Menu of the TrayIcon.
NativeMenuExporterNo summary available.
ToolTipTextGets or sets the tooltip text of the TrayIcon.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

Command Property

Gets or sets the Avalonia.Controls.TrayIcon.Command property of a TrayIcon.

public System.Windows.Input.ICommand Command { get; set; }

CommandParameter Property

Gets or sets the parameter to pass to the Avalonia.Controls.TrayIcon.Command property of a Avalonia.Controls.TrayIcon.

public object CommandParameter { get; set; }

Icon Property

Gets or sets the icon of the TrayIcon.

public Avalonia.Controls.WindowIcon Icon { get; set; }

IsVisible Property

Gets or sets the visibility of the TrayIcon.

public bool IsVisible { get; set; }

Gets or sets the Menu of the TrayIcon.

public Avalonia.Controls.NativeMenu Menu { get; set; }

NativeMenuExporter Property

public Avalonia.Controls.Platform.INativeMenuExporter NativeMenuExporter { get; set; }

ToolTipText Property

Gets or sets the tooltip text of the TrayIcon.

public string ToolTipText { get; set; }

Fields

CommandParameterProperty Field

Defines the Avalonia.Controls.TrayIcon.CommandParameter property.

public Avalonia.StyledProperty<object> CommandParameterProperty

CommandProperty Field

Defines the Avalonia.Controls.TrayIcon.Command property.

public Avalonia.StyledProperty<System.Windows.Input.ICommand> CommandProperty

IconProperty Field

Defines the Avalonia.Controls.TrayIcon.Icon property.

public Avalonia.StyledProperty<Avalonia.Controls.WindowIcon> IconProperty

IconsProperty Field

Defines the Avalonia.Controls.TrayIcons attached property.

public Avalonia.AttachedProperty<Avalonia.Controls.TrayIcons> IconsProperty

IsVisibleProperty Field

Defines the Avalonia.Controls.TrayIcon.IsVisible property.

public Avalonia.StyledProperty<bool> IsVisibleProperty

Defines the Avalonia.Controls.TrayIcon.Menu property.

public Avalonia.StyledProperty<Avalonia.Controls.NativeMenu> MenuProperty

ToolTipTextProperty Field

Defines the Avalonia.Controls.TrayIcon.ToolTipText property.

public Avalonia.StyledProperty<string> ToolTipTextProperty

Events

NameDescription
ClickedRaised when the TrayIcon is clicked. Note, this is only supported on Win32 and some Linux DEs, on OSX this event is not raised.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.

Clicked Event

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