New to Telerik UI for WinFormsStart a free 30-day trial

Represents a control that can be used to display an icon in the Windows' taskbar notification area. The icon can then respond to user interaction as well as display tooltips, popups, balloon notifications and context menu.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
[TelerikToolboxCategory("Containers")]
public class RadNotifyIcon : Component, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentRadNotifyIcon

Implements: IComponentIDisposable

Constructors

Initializes a new instance of the RadNotifyIcon class.

C#
public RadNotifyIcon()

Properties

Gets or sets the icon of the balloon tip to be show when the ShowBalloonTip(int) method is called.

C#
[Browsable(true)]
public Icon BalloonIcon { get; set; }

Gets or sets the text of the balloon tip to be show when the ShowBalloonTip(int) method is called.

C#
[Browsable(true)]
public string BalloonText { get; set; }

Gets or sets the title of the balloon tip to be show when the ShowBalloonTip(int) method is called.

C#
[Browsable(true)]
public string BalloonTitle { get; set; }

Gets or sets the mouse action that must be performed over the notify icon to show the TrayContextMenu.

C#
[Browsable(true)]
public MouseActivationEvent ContextMenuActivationMouseEvent { get; set; }

Gets or sets the Guid id that will be used to identify the notify icon when sending messages to it.

C#
[Browsable(true)]
public Guid GuidItem { get; set; }

Gets a value indicating whether a popup is open.

C#
[Browsable(false)]
public bool IsPopupOpen { get; }

Gets or sets the mouse action that must be performed over the notify icon to show a popup with PopupContent.

C#
[Browsable(true)]
public MouseActivationEvent PopupActivationMouseEvent { get; set; }

Gets or sets the mode in which the popup closes.

C#
[Browsable(true)]
public PopupCloseMode PopupCloseMode { get; set; }

Gets or sets the control that is set as the content of the popup which the notify icon shows when the PopupActivationMouseEvent is performed.

C#
[Browsable(true)]
public Control PopupContent { get; set; }

Gets or sets the animation played when hiding the popup.

C#
[Browsable(true)]
public NotifyIconAnimationType PopupHideAnimation { get; set; }

Gets or sets the animation played when opening the popup.

C#
[Browsable(true)]
public NotifyIconAnimationType PopupShowAnimation { get; set; }

Gets or sets the amount of time in milliseconds after which the popup will begin to close automatically.

C#
[Browsable(true)]
public int PopupShowDuration { get; set; }

Gets or sets whether the icon is visible in the notification area.

C#
[Browsable(true)]
public bool ShowTrayIcon { get; set; }

Gets or sets theme name.

C#
[Browsable(true)]
public string ThemeName { get; set; }

Gets or sets the tooltip that will be shown when the mouse hovers over the notify icon.

C#
[Browsable(true)]
public string TooltipText { get; set; }

Gets or sets the context menu to be shown when the ContextMenuActivationMouseEvent is performed.

C#
[Browsable(true)]
public RadContextMenu TrayContextMenu { get; set; }

Gets or sets the icon to be displayed in the windows notification area.

C#
[Browsable(true)]
public Icon TrayIcon { get; set; }

Methods

Releases unmanaged resources and performs other cleanup operations before the RadNotifyIcon is reclaimed by garbage collection.

C#
protected ~RadNotifyIcon()

Adds the notify icon to the Windows notification area.

C#
public void AddIcon()

Disposes any resources this instance holds.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

Overrides: Component.Dispose(bool)

Checks the state of the computer for the current user to determine whether sending a notification is appropriate.

C#
public static UserNotificationState GetUserNotificationState()
Returns:

UserNotificationState

The state of the computer for the current user.

Hides the balloon tip.

C#
public void HideBalloonTip()

Hides the popup.

C#
public void HidePopup()

Fires the BalloonTipClicked event.

C#
protected virtual void OnBalloonTipClicked()

Fires the BalloonTipClosed event.

C#
protected virtual void OnBalloonTipClosed()

Fires the BalloonTipShown event.

C#
protected virtual void OnBalloonTipShown()

Fires the PopupOpened event.

C#
protected virtual void OnPopupOpened(EventArgs e)
Parameters:eEventArgs

The event arguments.

Fires the PopupOpening event.

C#
protected virtual void OnPopupOpening(NotifyIconPopupOpeningEventArgs e)
Parameters:eNotifyIconPopupOpeningEventArgs

The event arguments.

Fires the Selected event.

C#
protected virtual void OnSelected(NotifyIconSelectedEventArgs e)
Parameters:eNotifyIconSelectedEventArgs

The event arguments.

Fires the TrayContextMenuOpened event.

C#
protected virtual void OnTrayContextMenuOpened(EventArgs e)
Parameters:eEventArgs

The event arguments.

Fires the TrayContextMenuOpening event.

C#
protected virtual void OnTrayContextMenuOpening(CancelEventArgs e)
Parameters:eCancelEventArgs

The event arguments.

Fires the TrayIconMouseClick event.

C#
protected virtual void OnTrayIconMouseClick(MouseEventArgs e)
Parameters:eMouseEventArgs

The event arguments.

Fires the TrayIconMouseDoubleClick event.

C#
protected virtual void OnTrayIconMouseDoubleClick(MouseEventArgs e)
Parameters:eMouseEventArgs

The event arguments.

Fires the TrayIconMouseDown event.

C#
protected virtual void OnTrayIconMouseDown(MouseEventArgs e)
Parameters:eMouseEventArgs

The event arguments.

Fires the TrayIconMouseMove event.

C#
protected virtual void OnTrayIconMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

The event arguments.

Fires the TrayIconMouseUp event.

C#
protected virtual void OnTrayIconMouseUp(MouseEventArgs e)
Parameters:eMouseEventArgs

The event arguments.

Removes the icon from the Windows notification area.

C#
public void RemoveIcon()

Shows a balloon tip with the settings defined in the BalloonTitle, BalloonTitle and BalloonIcon properties.

C#
public void ShowBalloonTip(int timeout = 10)
Parameters:timeoutint

The amount of seconds to wait before the balloon auto hides. The system minimum and maximum are 10 and 30 seconds. Note this parameter has effect only in Windows 2000 and Windows XP. More information here https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-notifyicondataa.

Shows a balloon tip.

C#
public void ShowBalloonTip(string title, string text, BalloonTipIcon icon, bool doNotPlaySound = false, int timeout = 10)
Parameters:titlestring

The title of the balloon tip.

textstring

The text of the balloon tip.

iconBalloonTipIcon

The icon of the balloon tip.

doNotPlaySoundbool

Whether sound should be played when showing the balloon tip.

timeoutint

The amount of seconds to wait before the balloon auto hides. The system minimum and maximum are 10 and 30 seconds. Note this parameter has effect only in Windows 2000 and Windows XP. More information here https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-notifyicondataa.

Shows a balloon tip.

C#
public void ShowBalloonTip(string title, string text, Icon icon, bool doNotPlaySound = false, int timeout = 10)
Parameters:titlestring

The title of the balloon tip.

textstring

The text of the balloon tip.

iconIcon

The icon of the balloon tip.

doNotPlaySoundbool

Whether sound should be played when showing the balloon tip.

timeoutint

The amount of seconds to wait before the balloon auto hides. The system minimum and maximum are 10 and 30 seconds. Note this parameter has effect only in Windows 2000 and Windows XP. More information here https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-notifyicondataa.

Shows the popup next to the notify icon, depending on edge of the screen where the taskbar is located.

C#
public void ShowPopup()

Shows the popup at the provided location.

C#
public void ShowPopup(Point location)
Parameters:locationPoint

The coordinates where the popup should be opened.

Sends an update message to the notify icon.

C#
public void UpdateIcon()

Events

Occurs when the user clicks on a balloon tip.

C#
public event EventHandler BalloonTipClicked

Occurs when a balloon tip is closed.

C#
public event EventHandler BalloonTipClosed

Occurs when a balloon tip is shown.

C#
public event EventHandler BalloonTipShown

Occurs when the popup of the RadNotifyIcon is opened.

C#
public event EventHandler PopupOpened

Occurs before the popup of the RadNotifyIcon is opened.

C#
public event EventHandler<NotifyIconPopupOpeningEventArgs> PopupOpening

Occurs when the user selects a RadNotifyIcon in the Windows notification area.

C#
public event EventHandler<NotifyIconSelectedEventArgs> Selected

Occurs when the context menu of the RadNotifyIcon is opened.

C#
public event EventHandler TrayContextMenuOpened

Occurs before the context menu of the RadNotifyIcon is opened.

C#
public event CancelEventHandler TrayContextMenuOpening

Occurs when the user clicks on the notify icon.

C#
public event MouseEventHandler TrayIconMouseClick

Occurs when the user double clicks on the notify icon.

C#
public event MouseEventHandler TrayIconMouseDoubleClick

Occurs when the user presses a mouse button over the notify icon.

C#
public event MouseEventHandler TrayIconMouseDown

Occurs when the user moves the mouse over the notify icon.

C#
public event MouseEventHandler TrayIconMouseMove

Occurs when the user releases a mouse button over the notify icon.

C#
public event MouseEventHandler TrayIconMouseUp