Class
RadNotifyIcon

Provides a WPF control that represents a system tray icon with customizable features such as balloon tips, popups, and context menus. The RadNotifyIcon can be used to display an icon in the Windows notification area (system tray), allowing for user interaction with mouse events like clicks and movements. It offers various properties to customize its appearance and behavior such as TrayIcon, BalloonTitle, PopupContent, and more. Additionally, events are raised for user interactions, allowing developers to respond to user's actions, such as opening popups or displaying context menus.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Containers")]
public class RadNotifyIcon : FrameworkElement, IDisposable

Inheritance: objectRadNotifyIcon

Implements: IDisposable

Constructors

RadNotifyIcon()

Initializes a new instance of the RadNotifyIcon class.

Declaration

cs-api-definition
public RadNotifyIcon()

Fields

BalloonIconProperty

Identifies the BalloonIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BalloonIconProperty

Field Value

DependencyProperty

BalloonIconSourceProperty

Identifies the BalloonIconSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BalloonIconSourceProperty

Field Value

DependencyProperty

BalloonTextProperty

Identifies the BalloonText dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BalloonTextProperty

Field Value

DependencyProperty

BalloonTitleProperty

Identifies the BalloonTitle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BalloonTitleProperty

Field Value

DependencyProperty

ContextMenuActivationMouseEventProperty

Identifies the ContextMenuActivationMouseEvent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ContextMenuActivationMouseEventProperty

Field Value

DependencyProperty

GuidItemProperty

Identifies the GuidItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GuidItemProperty

Field Value

DependencyProperty

PopupActivationMouseEventProperty

Identifies the PopupActivationMouseEvent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PopupActivationMouseEventProperty

Field Value

DependencyProperty

PopupCloseModeProperty

Identifies the PopupCloseMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PopupCloseModeProperty

Field Value

DependencyProperty

PopupContentProperty

Identifies the PopupContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PopupContentProperty

Field Value

DependencyProperty

PopupContentTemplateProperty

Identifies the PopupContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PopupContentTemplateProperty

Field Value

DependencyProperty

PopupShowDurationProperty

Identifies the PopupShowDuration dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PopupShowDurationProperty

Field Value

DependencyProperty

ShowTrayIconProperty

Identifies the ShowTrayIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowTrayIconProperty

Field Value

DependencyProperty

TooltipContentProperty

Identifies the TooltipContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TooltipContentProperty

Field Value

DependencyProperty

TooltipContentTemplateProperty

Identifies the TooltipContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TooltipContentTemplateProperty

Field Value

DependencyProperty

TrayContextMenuProperty

Identifies the TrayContextMenu dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrayContextMenuProperty

Field Value

DependencyProperty

TrayIconProperty

Identifies the TrayIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrayIconProperty

Field Value

DependencyProperty

TrayIconSourceProperty

Identifies the TrayIconSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrayIconSourceProperty

Field Value

DependencyProperty

UseNativeTooltipProperty

Identifies the UseNativeTooltip dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UseNativeTooltipProperty

Field Value

DependencyProperty

Properties

BalloonIcon

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

Declaration

cs-api-definition
public Icon BalloonIcon { get; set; }

Property Value

Icon

BalloonIconSource

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

Declaration

cs-api-definition
public ImageSource BalloonIconSource { get; set; }

Property Value

ImageSource

BalloonText

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

Declaration

cs-api-definition
public string BalloonText { get; set; }

Property Value

string

BalloonTitle

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

Declaration

cs-api-definition
public string BalloonTitle { get; set; }

Property Value

string

ContextMenuActivationMouseEvent

Gets or sets the mouse action that must be performed over the notify icon to show the TrayContextMenu. This is a dependency property.

Declaration

cs-api-definition
public MouseActivationEvent ContextMenuActivationMouseEvent { get; set; }

Property Value

MouseActivationEvent

GuidItem

Gets or sets the Guid id that will be used to identify the notify icon when sending messages to it. This is a dependency property.

Declaration

cs-api-definition
public Guid GuidItem { get; set; }

Property Value

Guid

IsPopupOpen

Gets a value indicating whether a popup is open.

Declaration

cs-api-definition
public bool IsPopupOpen { get; }

Property Value

bool

IsTooltipOpen

Gets a value indicating whether a custom tooltip is open.

Declaration

cs-api-definition
public bool IsTooltipOpen { get; }

Property Value

bool

PopupActivationMouseEvent

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

Declaration

cs-api-definition
public MouseActivationEvent PopupActivationMouseEvent { get; set; }

Property Value

MouseActivationEvent

PopupCloseMode

Gets or sets the mode in which the popup closes. This is a dependency property.

Declaration

cs-api-definition
public PopupCloseMode PopupCloseMode { get; set; }

Property Value

PopupCloseMode

PopupContent

Gets or sets the content of the popup that the notify icon shows when the PopupActivationMouseEvent is performed. This is a dependency property.

Declaration

cs-api-definition
public object PopupContent { get; set; }

Property Value

object

PopupContentTemplate

Gets or sets the content template for the popup that the notify icon shows when the PopupActivationMouseEvent is performed. This is a dependency property.

Declaration

cs-api-definition
public DataTemplate PopupContentTemplate { get; set; }

Property Value

DataTemplate

PopupHideAnimation

Gets or sets the animation played when hiding the popup.

Declaration

cs-api-definition
public RadAnimation PopupHideAnimation { get; set; }

Property Value

RadAnimation

PopupShowAnimation

Gets or sets the animation played when opening the popup.

Declaration

cs-api-definition
public RadAnimation PopupShowAnimation { get; set; }

Property Value

RadAnimation

PopupShowDuration

Gets or sets the amount of time in milliseconds after which the popup will begin to close automatically. This is a dependency property.

Declaration

cs-api-definition
public int PopupShowDuration { get; set; }

Property Value

int

ShowTrayIcon

Gets or sets whether the icon is visible in the notification area. This is a dependency property.

Declaration

cs-api-definition
public bool ShowTrayIcon { get; set; }

Property Value

bool

TooltipContent

Gets or sets the content of the tooltip that will be shown when the mouse hovers over the notify icon. This is a dependency property.

Declaration

cs-api-definition
public object TooltipContent { get; set; }

Property Value

object

TooltipContentTemplate

Gets or sets the content template for the tooltip that will be shown when the mouse hovers over the notify icon. This is a dependency property.

Declaration

cs-api-definition
public DataTemplate TooltipContentTemplate { get; set; }

Property Value

DataTemplate

TrayContextMenu

Gets or sets the context menu to be shown when the ContextMenuActivationMouseEvent is performed. This is a dependency property.

Declaration

cs-api-definition
public RadContextMenu TrayContextMenu { get; set; }

Property Value

RadContextMenu

TrayIcon

Gets or sets the icon to be displayed in the windows notification area. This is a dependency property.

Declaration

cs-api-definition
public Icon TrayIcon { get; set; }

Property Value

Icon

TrayIconSource

Gets or sets the icon to be displayed in the windows notification area. This is a dependency property.

Declaration

cs-api-definition
public ImageSource TrayIconSource { get; set; }

Property Value

ImageSource

UseNativeTooltip

Gets or sets whether a native tooltip [true] or the TooltipContent and/or TooltipContentTemplate [false] will be shown when the mouse hovers over the notify icon. If set to [true] the TooltipContent property should be set to a string value. This is a dependency property.

Declaration

cs-api-definition
public bool UseNativeTooltip { get; set; }

Property Value

bool

Methods

AddIcon()

Adds the notify icon to the Windows notification area.

Declaration

cs-api-definition
public void AddIcon()

Dispose()

Disposes any resources this instance holds.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Disposes any resources this instance holds.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

Finalize()

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

Declaration

cs-api-definition
protected override void Finalize()

GetUserNotificationState()

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

Declaration

cs-api-definition
public static UserNotificationState GetUserNotificationState()

Returns

UserNotificationState

The state of the computer for the current user.

HideBalloonTip()

Hides the balloon tip.

Declaration

cs-api-definition
public void HideBalloonTip()

HidePopup()

Hides the popup.

Declaration

cs-api-definition
public void HidePopup()

MeasureOverride(Size)

Measurement override. Implement your size-to-content logic here.

Declaration

cs-api-definition
protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize

Size

Available size that parent can give to the child.

Returns

Size

Desired Size of the control, given available size passed as parameter.

OnBalloonTipClicked()

Fires the BalloonTipClicked event.

Declaration

cs-api-definition
protected virtual void OnBalloonTipClicked()

OnBalloonTipClosed()

Fires the BalloonTipClosed event.

Declaration

cs-api-definition
protected virtual void OnBalloonTipClosed()

OnBalloonTipShown()

Fires the BalloonTipShown event.

Declaration

cs-api-definition
protected virtual void OnBalloonTipShown()

OnPopupOpened(EventArgs)

Fires the PopupOpened event.

Declaration

cs-api-definition
protected virtual void OnPopupOpened(EventArgs e)

Parameters

e

EventArgs

The event arguments.

OnPopupOpening(NotifyIconPopupOpeningEventArgs)

Fires the PopupOpening event.

Declaration

cs-api-definition
protected virtual void OnPopupOpening(NotifyIconPopupOpeningEventArgs e)

Parameters

e

NotifyIconPopupOpeningEventArgs

The event arguments.

OnPreviewTooltipOpened(CancelEventArgs)

Fires the PreviewTooltipOpened event.

Declaration

cs-api-definition
protected virtual void OnPreviewTooltipOpened(CancelEventArgs e)

Parameters

e

CancelEventArgs

The event arguments.

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Notification that a specified property has been changed.

Declaration

cs-api-definition
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

EventArgs that contains the property, metadata, old value, and new value for this change.

OnSelected(NotifyIconSelectedEventArgs)

Fires the Selected event.

Declaration

cs-api-definition
protected virtual void OnSelected(NotifyIconSelectedEventArgs e)

Parameters

e

NotifyIconSelectedEventArgs

The event arguments.

OnTooltipOpened(EventArgs)

Fires the TooltipOpened event.

Declaration

cs-api-definition
protected virtual void OnTooltipOpened(EventArgs e)

Parameters

e

EventArgs

The event arguments.

OnTrayContextMenuOpened(EventArgs)

Fires the TrayContextMenuOpened event.

Declaration

cs-api-definition
protected virtual void OnTrayContextMenuOpened(EventArgs e)

Parameters

e

EventArgs

The event arguments.

OnTrayContextMenuOpening(CancelEventArgs)

Fires the TrayContextMenuOpening event.

Declaration

cs-api-definition
protected virtual void OnTrayContextMenuOpening(CancelEventArgs e)

Parameters

e

CancelEventArgs

The event arguments.

OnTrayIconMouseClick(MouseButtonEventArgs)

Fires the TrayIconMouseClick event.

Declaration

cs-api-definition
protected virtual void OnTrayIconMouseClick(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

The event arguments.

OnTrayIconMouseDoubleClick(MouseButtonEventArgs)

Fires the TrayIconMouseDoubleClick event.

Declaration

cs-api-definition
protected virtual void OnTrayIconMouseDoubleClick(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

The event arguments.

OnTrayIconMouseDown(MouseButtonEventArgs)

Fires the TrayIconMouseDown event.

Declaration

cs-api-definition
protected virtual void OnTrayIconMouseDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

The event arguments.

OnTrayIconMouseMove(MouseEventArgs)

Fires the TrayIconMouseMove event.

Declaration

cs-api-definition
protected virtual void OnTrayIconMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

The event arguments.

OnTrayIconMouseUp(MouseButtonEventArgs)

Fires the TrayIconMouseUp event.

Declaration

cs-api-definition
protected virtual void OnTrayIconMouseUp(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

The event arguments.

RemoveIcon()

Removes the icon from the Windows notification area.

Declaration

cs-api-definition
public void RemoveIcon()

ShowBalloonTip(int)

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

Declaration

cs-api-definition
public void ShowBalloonTip(int timeout = 10)

Parameters

timeout

int

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.

ShowBalloonTip(string, string, BalloonTipIcon, bool, int)

Shows a balloon tip.

Declaration

cs-api-definition
public void ShowBalloonTip(string title, string text, BalloonTipIcon icon, bool doNotPlaySound = false, int timeout = 10)

Parameters

title

string

The title of the balloon tip.

text

string

The text of the balloon tip.

icon

BalloonTipIcon

The icon of the balloon tip.

doNotPlaySound

bool

Whether sound should be played when showing the balloon tip.

timeout

int

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.

ShowBalloonTip(string, string, Icon, bool, bool, int)

Shows a balloon tip.

Declaration

cs-api-definition
public void ShowBalloonTip(string title, string text, Icon icon, bool useLargeIcon = true, bool doNotPlaySound = false, int timeout = 10)

Parameters

title

string

The title of the balloon tip.

text

string

The text of the balloon tip.

icon

Icon

The icon of the balloon tip.

useLargeIcon

bool

Whether the large version of the provided icon should be used.

doNotPlaySound

bool

Whether sound should be played when showing the balloon tip.

timeout

int

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.

ShowPopup()

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

Declaration

cs-api-definition
public void ShowPopup()

ShowPopup(Point)

Shows the popup at the provided location.

Declaration

cs-api-definition
public void ShowPopup(Point location)

Parameters

location

Point

The coordinates where the popup should be opened.

UpdateIcon()

Sends an update message to the notify icon.

Declaration

cs-api-definition
public void UpdateIcon()

Events

BalloonTipClicked

Occurs when the user clicks on a balloon tip.

Declaration

cs-api-definition
public event EventHandler BalloonTipClicked

Event Value

EventHandler

BalloonTipClosed

Occurs when a balloon tip is closed.

Declaration

cs-api-definition
public event EventHandler BalloonTipClosed

Event Value

EventHandler

BalloonTipShown

Occurs when a balloon tip is shown.

Declaration

cs-api-definition
public event EventHandler BalloonTipShown

Event Value

EventHandler

PopupOpened

Occurs when the popup of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event EventHandler PopupOpened

Event Value

EventHandler

PopupOpening

Occurs before the popup of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event EventHandler<NotifyIconPopupOpeningEventArgs> PopupOpening

Event Value

EventHandler<NotifyIconPopupOpeningEventArgs>

PreviewTooltipOpened

Occurs before the custom tooltip of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event CancelEventHandler PreviewTooltipOpened

Event Value

CancelEventHandler

Selected

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

Declaration

cs-api-definition
public event EventHandler<NotifyIconSelectedEventArgs> Selected

Event Value

EventHandler<NotifyIconSelectedEventArgs>

TooltipOpened

Occurs when the custom tooltip of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event EventHandler TooltipOpened

Event Value

EventHandler

TrayContextMenuOpened

Occurs when the context menu of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event EventHandler TrayContextMenuOpened

Event Value

EventHandler

TrayContextMenuOpening

Occurs before the context menu of the RadNotifyIcon is opened.

Declaration

cs-api-definition
public event CancelEventHandler TrayContextMenuOpening

Event Value

CancelEventHandler

TrayIconMouseClick

Occurs when the user clicks on the notify icon.

Declaration

cs-api-definition
public event MouseButtonEventHandler TrayIconMouseClick

Event Value

MouseButtonEventHandler

TrayIconMouseDoubleClick

Occurs when the user double clicks on the notify icon.

Declaration

cs-api-definition
public event MouseButtonEventHandler TrayIconMouseDoubleClick

Event Value

MouseButtonEventHandler

TrayIconMouseDown

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

Declaration

cs-api-definition
public event MouseButtonEventHandler TrayIconMouseDown

Event Value

MouseButtonEventHandler

TrayIconMouseMove

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

Declaration

cs-api-definition
public event MouseEventHandler TrayIconMouseMove

Event Value

MouseEventHandler

TrayIconMouseUp

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

Declaration

cs-api-definition
public event MouseButtonEventHandler TrayIconMouseUp

Event Value

MouseButtonEventHandler

In this article
DefinitionConstructorsRadNotifyIcon()FieldsBalloonIconPropertyBalloonIconSourcePropertyBalloonTextPropertyBalloonTitlePropertyContextMenuActivationMouseEventPropertyGuidItemPropertyPopupActivationMouseEventPropertyPopupCloseModePropertyPopupContentPropertyPopupContentTemplatePropertyPopupShowDurationPropertyShowTrayIconPropertyTooltipContentPropertyTooltipContentTemplatePropertyTrayContextMenuPropertyTrayIconPropertyTrayIconSourcePropertyUseNativeTooltipPropertyPropertiesBalloonIconBalloonIconSourceBalloonTextBalloonTitleContextMenuActivationMouseEventGuidItemIsPopupOpenIsTooltipOpenPopupActivationMouseEventPopupCloseModePopupContentPopupContentTemplatePopupHideAnimationPopupShowAnimationPopupShowDurationShowTrayIconTooltipContentTooltipContentTemplateTrayContextMenuTrayIconTrayIconSourceUseNativeTooltipMethodsAddIcon()Dispose()Dispose(bool)Finalize()GetUserNotificationState()HideBalloonTip()HidePopup()MeasureOverride(Size)OnBalloonTipClicked()OnBalloonTipClosed()OnBalloonTipShown()OnPopupOpened(EventArgs)OnPopupOpening(NotifyIconPopupOpeningEventArgs)OnPreviewTooltipOpened(CancelEventArgs)OnPropertyChanged(DependencyPropertyChangedEventArgs)OnSelected(NotifyIconSelectedEventArgs)OnTooltipOpened(EventArgs)OnTrayContextMenuOpened(EventArgs)OnTrayContextMenuOpening(CancelEventArgs)OnTrayIconMouseClick(MouseButtonEventArgs)OnTrayIconMouseDoubleClick(MouseButtonEventArgs)OnTrayIconMouseDown(MouseButtonEventArgs)OnTrayIconMouseMove(MouseEventArgs)OnTrayIconMouseUp(MouseButtonEventArgs)RemoveIcon()ShowBalloonTip(int)ShowBalloonTip(string, string, BalloonTipIcon, bool, int)ShowBalloonTip(string, string, Icon, bool, bool, int)ShowPopup()ShowPopup(Point)UpdateIcon()EventsBalloonTipClickedBalloonTipClosedBalloonTipShownPopupOpenedPopupOpeningPreviewTooltipOpenedSelectedTooltipOpenedTrayContextMenuOpenedTrayContextMenuOpeningTrayIconMouseClickTrayIconMouseDoubleClickTrayIconMouseDownTrayIconMouseMoveTrayIconMouseUp
Not finding the help you need?
Contact Support