Table of Contents

Class NotifyIcon

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Specifies a component that creates an icon in the notification area.

public class NotifyIcon : HandledObject<INotifyIconHandler>, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IImmutableObject, IDisposableObject, IDisposable, IBaseObject
Inheritance
NotifyIcon
Implements

Remarks

Icons in the notification area are shortcuts to processes that are running in the background of a computer, such as a virus protection program or a volume control. These processes do not come with their own user interfaces. The NotifyIcon class provides a way to program in this functionality. The Icon property defines the icon that appears in the notification area. Pop-up menus for an icon are addressed with the Menu property. The Text property assigns tool tip text. In order for the icon to show up in the notification area, the Visible property must be set to true. There are also events to handle mouse actions, such as clicks and double-clicks. These events do not work on macOS.

Constructors

NotifyIcon()

Initializes a new instance of the NotifyIcon class.

Properties

Icon

Gets or sets the current icon.

IsAvailable

Gets whether system tray is available in the desktop environment the app runs under.

IsIconInstalled

Gets whether icon was actually installed and visible.

IsOk

Gets whether this object initialized successfully.

Menu

Gets or sets the menu associated with the NotifyIcon.

Text

Gets or sets the tool tip text displayed when the mouse pointer rests on a notification area icon.

Visible

Gets or sets a value indicating whether the icon is visible in the notification area of the taskbar.

Methods

CreateHandler()

Creates handler.

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

OnClick(EventArgs)

Called when the Click event is raised.

OnLeftMouseButtonDoubleClick(EventArgs)

Called when the left mouse button is double-clicked over the notification icon.

OnLeftMouseButtonDown(EventArgs)

Called when the left mouse button is pressed over the notification icon.

OnLeftMouseButtonUp(EventArgs)

Called when the left mouse button is released over the notification icon.

OnRightMouseButtonDoubleClick(EventArgs)

Called when the right mouse button is double-clicked over the notification icon.

OnRightMouseButtonDown(EventArgs)

Called when the right mouse button is pressed over the notification icon.

OnRightMouseButtonUp(EventArgs)

Called when the right mouse button is released over the notification icon.

RaiseClick()

Raises the Click event and calls OnClick(EventArgs).

RaiseLeftMouseButtonDoubleClick()

Raises the LeftMouseButtonDoubleClick event and calls OnLeftMouseButtonDoubleClick(EventArgs).

RaiseLeftMouseButtonDown()

Raises the LeftMouseButtonDown event and calls OnLeftMouseButtonDown(EventArgs).

RaiseLeftMouseButtonUp()

Raises the LeftMouseButtonUp event and calls OnLeftMouseButtonUp(EventArgs).

RaiseRightMouseButtonDoubleClick()

Raises the RightMouseButtonDoubleClick event and calls OnRightMouseButtonDoubleClick(EventArgs).

RaiseRightMouseButtonDown()

Raises the RightMouseButtonDown event and calls OnRightMouseButtonDown(EventArgs).

RaiseRightMouseButtonUp()

Raises the RightMouseButtonUp event and calls OnRightMouseButtonUp(EventArgs).

Events

Click

Occurs when the icon in the notification area is clicked with the right mouse button. This event is not raised on macOS.

LeftMouseButtonDoubleClick

Occurs when the icon in the notification area is double-clicked with the left mouse button. This event is not raised on macOS.

LeftMouseButtonDown

Occurs when the icon in the notification area is pressed with the left mouse button. This event is not raised on macOS.

LeftMouseButtonUp

Occurs when the icon in the notification area is released with the left mouse button. This event is not raised on macOS.

RightMouseButtonDoubleClick

Occurs when the icon in the notification area is double-clicked with the right mouse button. This event is not raised on macOS.

RightMouseButtonDown

Occurs when the icon in the notification area is pressed with the right mouse button. This event is not raised on macOS.

RightMouseButtonUp

Occurs when the icon in the notification area is released with the right mouse button. This event is not raised on macOS.