ClassRadDesktopAlert
This class represents a Desktop Alert component which can be used to display a small window on the screen to notify the user that an event occurred. The location of the window and the way it appears can be customized.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadDesktopAlert : RadComponent, INotifyPropertyChanged, ICustomTypeDescriptor, IComponent, IDisposable
Inheritance: objectDisposableObjectRadObjectRadComponentRadDesktopAlert
Implements:
Inherited Members
Constructors
RadDesktopAlert()
Initializes a new instance of the RadDesktopAlert class.
Declaration
public RadDesktopAlert()
RadDesktopAlert(IContainer)
Initializes a new instance of the RadDesktopAlert class with the specified container.
Declaration
public RadDesktopAlert(IContainer container)
Parameters
container
An implementation of the IContainer interface that holds this instance.
Properties
AutoClose
Gets or sets a boolean value determining whether the alert popup will be automatically closed after a given amount of time.
AutoCloseDelay
Gets or sets the amount of time in seconds after which the alert will be automatically closed.
AutoSize
Gets or sets a value indicating whether the control is automatically resized by height to display its entire contents.
Declaration
[Browsable(true)]
public virtual bool AutoSize { get; set; }
Property Value
ButtonItems
Gets or sets the items collection containing the button items shown at the bottom part of the desktop alert's popup.
Declaration
public RadItemCollection ButtonItems { get; }
Property Value
CanMove
Gets or sets a boolean value determining whether the popup can be moved by dragging the caption grip.
CaptionText
Gets or sets the alert's caption text. The caption text is displayed below the moving grip of the alert's popup.
ContentImage
Gets or sets the content image of the RadDesktopAlert.
ContentText
Gets or sets the text displayed in the alert popup. This text can be HTML formatted to achieve better appearance.
DpiScaleElement
Gets the element used for storing the current DPI scale.
FadeAnimationFrames
Gets or sets the count of animation frames for the fade animation.
FadeAnimationSpeed
Gets or sets the interval in milliseconds between two animation frames.
FadeAnimationType
Gets or sets a value from the FadeAnimationType enumerator that determines the type of fade animation performed when the alert's popup is opened/closed.
Declaration
public FadeAnimationType FadeAnimationType { get; set; }
Property Value
FixedSize
Gets or sets the fixed size for the alert's popup. If the value is Size.Empty, the popup adjusts its size according to its content. Otherwise the value of this property is considered.
IsPinned
Gets or sets a boolean value determining whether the alert's popup will be pinned on the screen. If pinned, the alert's popup will not be automatically closed upon mouse click outside its bounds or if the AutoClose property is set to true.
Opacity
Gets or sets the initial opacity of the alert's popup.
OptionItems
Gets the items collection containing the items added to the options drop-down button of the desktop alert's popup.
Declaration
public RadItemCollection OptionItems { get; }
Property Value
PlaySound
Gets or sets a boolean value determining whether a sound is played when the alert's popup is shown.
Declaration
[Browsable(false)]
public bool PlaySound { get; set; }
Property Value
Popup
Gets an instance of the DesktopAlertPopupclass that represents the popup of the desktop alert.
Declaration
[Browsable(false)]
public DesktopAlertPopup Popup { get; }
Property Value
PopupAnimation
Gets or sets a boolean value determining whether the alert's popup will be animated.
PopupAnimationDirection
Gets or sets a value determining the direction of the alert's popup animation.
Declaration
public RadDirection PopupAnimationDirection { get; set; }
Property Value
PopupAnimationEasing
Gets or sets the type of the drop-down animation easing.
Declaration
public RadEasingType PopupAnimationEasing { get; set; }
Property Value
PopupAnimationFrames
Gets or sets the count of the alert's drop-down animation frames.
RightToLeft
Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
Declaration
public virtual RightToLeft RightToLeft { get; set; }
Property Value
One of the RightToLeft values. The default is Inherit.
Exceptions
The assigned value is not one of the RightToLeft values.
ScreenPosition
Gets or sets a value of the AlertScreenPosition enum which defines the position of the alert popup on the working area of the active screen.
Declaration
public virtual AlertScreenPosition ScreenPosition { get; set; }
Property Value
ShowCloseButton
Gets or sets a boolean value determining whether the close button is shown.
ShowOptionsButton
Gets or sets a boolean value determining whether the options button is shown.
ShowPinButton
Gets or sets a boolean value determining whether the pin button is shown.
SoundToPlay
Gets or sets the sound which is played when the alert's popup is shown and the PlaySound property is set to true.
Declaration
[Browsable(false)]
public SystemSound SoundToPlay { get; set; }
Property Value
Methods
CreatePopup()
Creates and returns an instance of the DesktopAlertPopup class that represents the alert's popup.
Declaration
protected virtual DesktopAlertPopup CreatePopup()
Returns
A new instance of DesktopAlertPopup.
DisposeManagedResources()
Releases the managed resources used by the RadDesktopAlert and optionally releases the unmanaged resources.
Declaration
protected override void DisposeManagedResources()
Overrides
GetLocationModifiedByUser()
Gets a value indicating whether the location has been modified by the user.
Declaration
protected virtual bool GetLocationModifiedByUser()
Returns
true if the location was modified by the user; otherwise, false.
GetOwnedTreeHandler()
Gets the component tree handler for this RadDesktopAlert.
Declaration
public override IComponentTreeHandler GetOwnedTreeHandler()
Returns
The IComponentTreeHandler for this component.
Overrides
GetPopupSize()
Calculates and returns the size of the popup based on the fixed size or content requirements.
Declaration
protected virtual Size GetPopupSize()
Returns
The calculated size for the popup.
OnLocationChangeRequested(Point)
Handles location change requests for the alert.
Declaration
protected virtual void OnLocationChangeRequested(Point alertLocation)
Parameters
alertLocation
The new location for the alert.
OnNotifyPropertyChanged(string)
Handles property change notifications and updates the popup theme if needed.
Declaration
protected override void OnNotifyPropertyChanged(string propertyName)
Parameters
propertyName
The name of the property that changed.
Overrides
OnPopupClosed(object, RadPopupClosedEventArgs)
Raises the Closed event.
Declaration
protected virtual void OnPopupClosed(object sender, RadPopupClosedEventArgs args)
Parameters
sender
The source of the event.
args
A RadPopupClosedEventArgs that contains the event data.
OnPopupClosing(object, RadPopupClosingEventArgs)
Raises the Closing event.
Declaration
protected virtual void OnPopupClosing(object sender, RadPopupClosingEventArgs args)
Parameters
sender
The source of the event.
args
A RadPopupClosingEventArgs that contains the event data.
OnPopupOpened(object, EventArgs)
Raises the Opened event.
OnPopupOpening(object, RadPopupOpeningEventArgs)
Raises the Opening event.
Declaration
protected virtual void OnPopupOpening(object sender, RadPopupOpeningEventArgs args)
Parameters
sender
The source of the event.
args
A RadPopupOpeningEventArgs that contains the event data.
ResetLocationModifier()
Resets the explicit location modifier. If the user has modified the location of the alert's popup, the DesktopAlertManager will not consider it when rearranging the visible alerts. This method resets the explicit location modifier so the DesktopAlertManager will continue managing the location of the alert according to its location settings.
Declaration
public void ResetLocationModifier()
Show()
Displays the alert popup on the screen at the specified location.
Declaration
public void Show()
Events
Closed
Occurs when the alert's popup has been closed.
Declaration
public event RadPopupClosedEventHandler Closed
Event Value
Closing
Occurs when the alert's popup is about to be closed. The closing action can be canceled by modifying the event arguments.
Declaration
public event RadPopupClosingEventHandler Closing
Event Value
Opened
Occurs when the alert's popup has been opened.
Declaration
public event RadPopupOpenedEventHandler Opened
Event Value
Opening
Occurs when the alert's popup is about to be opened. The opening action can be canceled by modifying the event arguments.
Declaration
public event RadPopupOpeningEventHandler Opening
Event Value