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

Represents a customizable desktop alert notification that can display information to the user through various properties and events. The RadDesktopAlert can be configured to automatically close after a specified duration, can include an icon, and offers options for showing close and menu buttons. Users can interact with the alert—clicking it raises a click event, while the presence of a command enables the invocation of predefined methods. Furthermore, it supports appearing in the Task Switcher and can display a dropdown menu, providing a flexible way to present alerts within a desktop application.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
[TelerikToolboxCategory("Containers")]
public class RadDesktopAlert : HeaderedContentControl, ICommandSource

Inheritance: objectRadDesktopAlert

Implements: ICommandSource

Constructors

Initializes a new instance of the RadDesktopAlert class.

C#
public RadDesktopAlert()

Fields

CanAutoCloseProperty

DependencyProperty

Identifies the CanAutoClose dependency property.

C#
public static readonly DependencyProperty CanAutoCloseProperty

CanMoveProperty

DependencyProperty

Identifies the CanMove dependency property.

C#
public static readonly DependencyProperty CanMoveProperty

ClickEvent

RoutedEvent

Identifies the Click routed event.

C#
public static readonly RoutedEvent ClickEvent

ClosedEvent

RoutedEvent

Identifies the Closed routed event.

C#
public static readonly RoutedEvent ClosedEvent

CommandParameterProperty

DependencyProperty

Identifies the CommandParameter dependency property.

C#
public static readonly DependencyProperty CommandParameterProperty

CommandProperty

DependencyProperty

Identifies the Command dependency property.

C#
public static readonly DependencyProperty CommandProperty

CommandTargetProperty

DependencyProperty

Identifies the CommandTarget property.

C#
public static readonly DependencyProperty CommandTargetProperty

IconColumnWidthProperty

DependencyProperty

Identifies the IconColumnWidth dependency property.

C#
public static readonly DependencyProperty IconColumnWidthProperty

IconMarginProperty

DependencyProperty

Identifies the IconMargin dependency property.

C#
public static readonly DependencyProperty IconMarginProperty

IconProperty

DependencyProperty

Identifies the Icon property.

C#
public static readonly DependencyProperty IconProperty

IconTemplateProperty

DependencyProperty

Identifies the IconTemplate dependency property.

C#
public static readonly DependencyProperty IconTemplateProperty

Identifies the IsHostedInDefaultWindow Property.

C#
public static readonly DependencyProperty IsHostedInDefaultWindowProperty

IsMenuOpenProperty

DependencyProperty

Identifies the IsMenuOpen dependency property.

C#
public static readonly DependencyProperty IsMenuOpenProperty

IsMouseOverAlertProperty

DependencyProperty

Identifies the IsMouseOverAlert Property.

C#
public static readonly DependencyProperty IsMouseOverAlertProperty

Identifies the MenuItemContainerStyle dependency property.

C#
public static readonly DependencyProperty MenuItemContainerStyleProperty

MenuItemsSourceProperty

DependencyProperty

Identifies the MenuItemsSource dependency property.

C#
public static readonly DependencyProperty MenuItemsSourceProperty

ShowCloseButtonProperty

DependencyProperty

Identifies the ShowCloseButton dependency property.

C#
public static readonly DependencyProperty ShowCloseButtonProperty

ShowDurationProperty

DependencyProperty

Identifies the ShowDuration dependency property.

C#
public static readonly DependencyProperty ShowDurationProperty

ShowInTaskSwitcherProperty

DependencyProperty

Identifies the ShowInTaskSwitcher dependency property.

C#
public static readonly DependencyProperty ShowInTaskSwitcherProperty

ShowMenuButtonProperty

DependencyProperty

Identifies the ShowMenuButton dependency property.

C#
public static readonly DependencyProperty ShowMenuButtonProperty

SoundProperty

DependencyProperty

Identifies the Sound dependency property.

C#
public static readonly DependencyProperty SoundProperty

Properties

Gets or sets the value that indicates whether the RadDesktopAlert can automatically close. This is a dependency property.

C#
public bool CanAutoClose { get; set; }
Property Value:

True if this instance can automatically close; otherwise, false.

Remarks:

If the value of this property is true, the instance will automatically close whenever the ShowDuration time elapses.

Gets or sets a boolean value determining whether the RadDesktopAlert can be moved by dragging. This is a dependency property.

C#
public bool CanMove { get; set; }
Property Value:

True if this instance can be dragged; otherwise, false.

Remarks:

If the value of this property is true, the instance can be dragged; otherwise it is fixed.

Gets the command that will be executed when the command source is invoked.

C#
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }

Represents a user defined data value that can be passed to the command when it is executed.

C#
public object CommandParameter { get; set; }

CommandTarget

IInputElement

The object that the command is being executed on.

C#
public IInputElement CommandTarget { get; set; }

Gets or sets the icon that appears in a RadDesktopAlert. This is a dependency property.

C#
[SRCategory("Appearance")]
public object Icon { get; set; }

Gets or sets the width of the column that contains the icon area. This is a dependency property.

C#
[SRCategory("Appearance")]
public double IconColumnWidth { get; set; }

IconMargin

Thickness

Gets or sets the margin of the icon of RadDesktopAlert. This is a dependency property.

C#
[SRCategory("Appearance")]
public Thickness IconMargin { get; set; }

IconTemplate

DataTemplate

Gets or sets the data template used for Icon. This is a dependency property.

C#
[SRCategory("Appearance")]
public DataTemplate IconTemplate { get; set; }

Gets a value indicating whether the RadDesktopAlert instance is hosted in the default window.

C#
public bool IsHostedInDefaultWindow { get; }

Gets or sets the value that indicates whether the RadDesktopAlert drop-down menu is currently open. This is a dependency property.

C#
public bool IsMenuOpen { get; set; }

Gets a value indicating whether the mouse pointer is located over RadDesktopAlert.

C#
public bool IsMouseOverAlert { get; }

Gets or sets the Style that is applied to the container element generated for each item of RadDesktopAlert drop-down menu.

C#
public Style MenuItemContainerStyle { get; set; }

Gets or sets a collection used to generate the content of RadDesktopAlert drop-down menu.

C#
public IEnumerable MenuItemsSource { get; set; }

Gets or sets a boolean value determining whether the Close button of RadDesktopAlert will be visible. This is a dependency property.

C#
public bool ShowCloseButton { get; set; }
Property Value:

True if the Close button is visible; false otherwise.

Remarks:

If the value of this property is true, the Close button is visible; otherwise is hidden.

Gets or sets the amount of time in milliseconds after which RadDesktopAlert will be automatically closed. This is a dependency property.

C#
public int ShowDuration { get; set; }

Gets or sets a boolean value determining whether the RadDesktopAlert would be visible in the Task Switcher (Alt+Tab) menu of the Windows. The default value is true. This is a dependency property.

C#
public bool ShowInTaskSwitcher { get; set; }
Remarks:

If the value of this property is true, the instance won't be hidden; otherwise would be hidden.

Gets or sets a boolean value determining whether the Menu button of RadDesktopAlert will be visible. This is a dependency property.

C#
public bool ShowMenuButton { get; set; }
Property Value:

True if the Menu button is visible; false otherwise.

Remarks:

If the value of this property is true, the Menu button is visible; otherwise is hidden.

Sound

SystemSound

Gets or sets the system sound that will be played when the alert is shown. This is a dependency property.

C#
public SystemSound Sound { get; set; }

Methods

Called when the control is applying its template. This method is responsible for initializing the visual elements and setting up the necessary bindings and properties after the control's template has been applied.

C#
public override void OnApplyTemplate()
Remarks:

This method overrides the OnApplyTemplate method of the base class to provide specific functionality for the RadDesktopAlert control.

Called when the content of the alert is clicked and raises a Click event.

C#
protected virtual void OnClick()

Called when the alert is closed and raises a Closed event.

C#
protected virtual void OnClosed()
C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Raises the event.

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

The EventArgs instance containing the event data.

Raises the event.

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

The EventArgs instance containing the event data.

C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs
C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs
C#
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

Called when the alert is just shown and the sound can be played.

C#
protected virtual void PlaySound()

Resets the theme.

C#
public void ResetTheme()

Events

Occurs when a RadDesktopAlert is clicked.

C#
[SRCategory("Behavior")]
public event RadRoutedEventHandler Click

Occurs when a RadDesktopAlert is closed.

C#
[SRCategory("Behavior")]
public event RadRoutedEventHandler Closed

Occurs when the drop-down menu of the RadDesktopAlert closes.

C#
[SRCategory("Behavior")]
public event EventHandler MenuClosed

Occurs when the drop-down menu of the RadDesktopAlert opens.

C#
[SRCategory("Behavior")]
public event EventHandler MenuOpened