Class RadDesktopAlert
Represents control that can be used to display a small notification on the screen to alert the user that an event occurred. The location of the alert and the way it appears can be customized.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
[TelerikToolboxCategory("Containers")]
public class RadDesktopAlert : HeaderedContentControl, ICommandSource, IThemable
Constructors
RadDesktopAlert()
Fields
CanAutoCloseProperty
Identifies the CanAutoClose dependency property.
Declaration
public static readonly DependencyProperty CanAutoCloseProperty
Field Value
System.Windows.DependencyProperty
|
CanMoveProperty
Identifies the CanMove dependency property.
Declaration
public static readonly DependencyProperty CanMoveProperty
Field Value
System.Windows.DependencyProperty
|
ClickEvent
Identifies the Click routed event.
Declaration
public static readonly RoutedEvent ClickEvent
Field Value
System.Windows.RoutedEvent
|
ClosedEvent
Identifies the Closed routed event.
Declaration
public static readonly RoutedEvent ClosedEvent
Field Value
System.Windows.RoutedEvent
|
CommandParameterProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
System.Windows.DependencyProperty
|
CommandProperty
Identifies the Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
System.Windows.DependencyProperty
|
CommandTargetProperty
Identifies the CommandTarget property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
System.Windows.DependencyProperty
|
IconColumnWidthProperty
Identifies the IconColumnWidth dependency property.
Declaration
public static readonly DependencyProperty IconColumnWidthProperty
Field Value
System.Windows.DependencyProperty
|
IconMarginProperty
Identifies the IconMargin dependency property.
Declaration
public static readonly DependencyProperty IconMarginProperty
Field Value
System.Windows.DependencyProperty
|
IconProperty
Identifies the Icon property.
Declaration
public static readonly DependencyProperty IconProperty
Field Value
System.Windows.DependencyProperty
|
IconTemplateProperty
Identifies the IconTemplate dependency property.
Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
System.Windows.DependencyProperty
|
IsHostedInDefaultWindowProperty
Identifies the IsHostedInDefaultWindow Property.
Declaration
public static readonly DependencyProperty IsHostedInDefaultWindowProperty
Field Value
System.Windows.DependencyProperty
|
IsMenuOpenProperty
Identifies the IsMenuOpen dependency property.
Declaration
public static readonly DependencyProperty IsMenuOpenProperty
Field Value
System.Windows.DependencyProperty
|
IsMouseOverAlertProperty
Identifies the IsMouseOverAlert Property.
Declaration
public static readonly DependencyProperty IsMouseOverAlertProperty
Field Value
System.Windows.DependencyProperty
|
MenuItemContainerStyleProperty
Identifies the MenuItemContainerStyle dependency property.
Declaration
public static readonly DependencyProperty MenuItemContainerStyleProperty
Field Value
System.Windows.DependencyProperty
|
MenuItemsSourceProperty
Identifies the MenuItemsSource dependency property.
Declaration
public static readonly DependencyProperty MenuItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
ShowCloseButtonProperty
Identifies the ShowCloseButton dependency property.
Declaration
public static readonly DependencyProperty ShowCloseButtonProperty
Field Value
System.Windows.DependencyProperty
|
ShowDurationProperty
Identifies the ShowDuration dependency property.
Declaration
public static readonly DependencyProperty ShowDurationProperty
Field Value
System.Windows.DependencyProperty
|
ShowInTaskSwitcherProperty
Identifies the ShowInTaskSwitcher dependency property.
Declaration
public static readonly DependencyProperty ShowInTaskSwitcherProperty
Field Value
System.Windows.DependencyProperty
|
ShowMenuButtonProperty
Identifies the ShowMenuButton dependency property.
Declaration
public static readonly DependencyProperty ShowMenuButtonProperty
Field Value
System.Windows.DependencyProperty
|
SoundProperty
Identifies the Sound dependency property.
Declaration
public static readonly DependencyProperty SoundProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CanAutoClose
Gets or sets the value that indicates whether the RadDesktopAlert can automatically close. This is a dependency property.
Declaration
public bool CanAutoClose { get; set; }
Property Value
System.Boolean
|
Remarks
If the value of this property is true
, the instance will automatically close whenever the
ShowDuration time elapses.
CanMove
Gets or sets a boolean value determining whether the RadDesktopAlert can be moved by dragging. This is a dependency property.
Declaration
public bool CanMove { get; set; }
Property Value
System.Boolean
|
Remarks
If the value of this property is true
, the instance can be dragged; otherwise it is fixed.
Command
Gets the command that will be executed when the command source is invoked.
Declaration
public ICommand Command { get; set; }
Property Value
System.Windows.Input.ICommand
|
CommandParameter
Represents a user defined data value that can be passed to the command when it is executed.
Declaration
public object CommandParameter { get; set; }
Property Value
System.Object
|
CommandTarget
The object that the command is being executed on.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
System.Windows.IInputElement
|
Icon
Gets or sets the icon that appears in a RadDesktopAlert. This is a dependency property.
Declaration
[SRCategory("Appearance")]
public object Icon { get; set; }
Property Value
System.Object
|
IconColumnWidth
Gets or sets the width of the column that contains the icon area. This is a dependency property.
Declaration
[SRCategory("Appearance")]
public double IconColumnWidth { get; set; }
Property Value
System.Double
|
IconMargin
Gets or sets the margin of the icon of RadDesktopAlert. This is a dependency property.
Declaration
[SRCategory("Appearance")]
public Thickness IconMargin { get; set; }
Property Value
System.Windows.Thickness
|
IconTemplate
Gets or sets the data template used for Icon. This is a dependency property.
Declaration
[SRCategory("Appearance")]
public DataTemplate IconTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
IsHostedInDefaultWindow
Gets a value indicating whether the RadDesktopAlert instance is hosted in the default window.
Declaration
public bool IsHostedInDefaultWindow { get; }
Property Value
System.Boolean
|
IsMenuOpen
Gets or sets the value that indicates whether the RadDesktopAlert drop-down menu is currently open. This is a dependency property.
Declaration
public bool IsMenuOpen { get; set; }
Property Value
System.Boolean
|
IsMouseOverAlert
Gets a value indicating whether the mouse pointer is located over RadDesktopAlert.
Declaration
public bool IsMouseOverAlert { get; }
Property Value
System.Boolean
|
MenuItemContainerStyle
Gets or sets the Style that is applied to the container element generated for each item of RadDesktopAlert drop-down menu.
Declaration
public Style MenuItemContainerStyle { get; set; }
Property Value
System.Windows.Style
|
MenuItemsSource
Gets or sets a collection used to generate the content of RadDesktopAlert drop-down menu.
Declaration
public IEnumerable MenuItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
|
ShowCloseButton
Gets or sets a boolean value determining whether the Close button of RadDesktopAlert will be visible. This is a dependency property.
Declaration
public bool ShowCloseButton { get; set; }
Property Value
System.Boolean
|
Remarks
If the value of this property is true
, the Close button is visible; otherwise is hidden.
ShowDuration
Gets or sets the amount of time in milliseconds after which RadDesktopAlert will be automatically closed. This is a dependency property.
Declaration
public int ShowDuration { get; set; }
Property Value
System.Int32
|
ShowInTaskSwitcher
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.
Declaration
public bool ShowInTaskSwitcher { get; set; }
Property Value
System.Boolean
|
Remarks
If the value of this property is true
, the instance won't be hidden; otherwise would be hidden.
ShowMenuButton
Gets or sets a boolean value determining whether the Menu button of RadDesktopAlert will be visible. This is a dependency property.
Declaration
public bool ShowMenuButton { get; set; }
Property Value
System.Boolean
|
Remarks
If the value of this property is true
, the Menu button is visible; otherwise is hidden.
Sound
Gets or sets the system sound that will be played when the alert is shown. This is a dependency property.
Declaration
public SystemSound Sound { get; set; }
Property Value
System.Media.SystemSound
|
Methods
add_Click(RadRoutedEventHandler)
Declaration
public void add_Click(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
add_Closed(RadRoutedEventHandler)
Declaration
public void add_Closed(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
OnApplyTemplate()
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.
Declaration
public override void OnApplyTemplate()
Remarks
This method overrides the OnApplyTemplate method of the base class to provide specific functionality for the RadDesktopAlert control.
OnClick()
Called when the content of the alert is clicked and raises a Click event.
Declaration
protected virtual void OnClick()
OnClosed()
Called when the alert is closed and raises a Closed event.
Declaration
protected virtual void OnClosed()
OnCreateAutomationPeer()
Creates a RadDesktopAlertAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnMenuClosed(EventArgs)
Raises the MenuClosed event.
Declaration
protected virtual void OnMenuClosed(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnMenuOpened(EventArgs)
Raises the MenuOpened event.
Declaration
protected virtual void OnMenuOpened(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnMouseEnter(MouseEventArgs)
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
|
OnMouseLeave(MouseEventArgs)
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
|
OnMouseLeftButtonUp(MouseButtonEventArgs)
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs
e
|
PlaySound()
Called when the alert is just shown and the sound can be played.
Declaration
protected virtual void PlaySound()
remove_Click(RadRoutedEventHandler)
Declaration
public void remove_Click(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
remove_Closed(RadRoutedEventHandler)
Declaration
public void remove_Closed(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
Events
Click
Occurs when a RadDesktopAlert is clicked.
Declaration
[SRCategory("Behavior")]
public event RadRoutedEventHandler Click
Event Type
RadRoutedEventHandler
|
Closed
Occurs when a RadDesktopAlert is closed.
Declaration
[SRCategory("Behavior")]
public event RadRoutedEventHandler Closed
Event Type
RadRoutedEventHandler
|
MenuClosed
Occurs when the drop-down menu of the RadDesktopAlert closes.
Declaration
[SRCategory("Behavior")]
public event EventHandler MenuClosed
Event Type
System.EventHandler
|
MenuOpened
Occurs when the drop-down menu of the RadDesktopAlert opens.
Declaration
[SRCategory("Behavior")]
public event EventHandler MenuOpened
Event Type
System.EventHandler
|