RadDesktopAlert
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
Initializes a new instance of the RadDesktopAlert class.
public RadDesktopAlert()
Initializes a new instance of the RadDesktopAlert class with the specified container.
public RadDesktopAlert(IContainer container)
An implementation of the IContainer interface that holds this instance.
Properties
Gets or sets a boolean value determining whether the alert popup will be automatically closed after a given amount of time.
public bool AutoClose { get; set; }
Gets or sets the amount of time in seconds after which the alert will be automatically closed.
public int AutoCloseDelay { get; set; }
Gets or sets a value indicating whether the control is automatically resized by height to display its entire contents.
[Browsable(true)]
public virtual bool AutoSize { get; set; }
Gets or sets the items collection containing the button items shown at the bottom part of the desktop alert's popup.
public RadItemCollection ButtonItems { get; }
Gets or sets a boolean value determining whether the popup can be moved by dragging the caption grip.
public bool CanMove { get; set; }
Gets or sets the alert's caption text. The caption text is displayed below the moving grip of the alert's popup.
public string CaptionText { get; set; }
Gets or sets the content image of the RadDesktopAlert.
public Image ContentImage { get; set; }
Gets or sets the text displayed in the alert popup. This text can be HTML formatted to achieve better appearance.
public string ContentText { get; set; }
Gets the element used for storing the current DPI scale.
public RadElement DpiScaleElement { get; }
Gets or sets the count of animation frames for the fade animation.
public int FadeAnimationFrames { get; set; }
Gets or sets the interval in milliseconds between two animation frames.
public int FadeAnimationSpeed { get; set; }
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.
public FadeAnimationType FadeAnimationType { get; set; }
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.
public Size FixedSize { get; set; }
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.
public bool IsPinned { get; set; }
Gets or sets the initial opacity of the alert's popup.
public float Opacity { get; set; }
Gets the items collection containing the items added to the options drop-down button of the desktop alert's popup.
public RadItemCollection OptionItems { get; }
Gets or sets a boolean value determining whether a sound is played when the alert's popup is shown.
[Browsable(false)]
public bool PlaySound { get; set; }
Gets an instance of the DesktopAlertPopupclass that represents the popup of the desktop alert.
[Browsable(false)]
public DesktopAlertPopup Popup { get; }
Gets or sets a boolean value determining whether the alert's popup will be animated.
public bool PopupAnimation { get; set; }
Gets or sets a value determining the direction of the alert's popup animation.
public RadDirection PopupAnimationDirection { get; set; }
Gets or sets the type of the drop-down animation easing.
public RadEasingType PopupAnimationEasing { get; set; }
Gets or sets the count of the alert's drop-down animation frames.
public int PopupAnimationFrames { get; set; }
Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
public virtual RightToLeft RightToLeft { get; set; }
One of the RightToLeft values. The default is Inherit.
Exceptions:The assigned value is not one of the RightToLeft values.
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.
public virtual AlertScreenPosition ScreenPosition { get; set; }
Gets or sets a boolean value determining whether the close button is shown.
public bool ShowCloseButton { get; set; }
Gets or sets a boolean value determining whether the options button is shown.
public bool ShowOptionsButton { get; set; }
Gets or sets a boolean value determining whether the pin button is shown.
public bool ShowPinButton { get; set; }
Gets or sets the sound which is played when the alert's popup is shown and the PlaySound property is set to true.
[Browsable(false)]
public SystemSound SoundToPlay { get; set; }
Methods
Creates and returns an instance of the DesktopAlertPopup class that represents the alert's popup.
Releases the managed resources used by the RadDesktopAlert and optionally releases the unmanaged resources.
protected override void DisposeManagedResources()
Overrides:
Gets a value indicating whether the location has been modified by the user.
protected virtual bool GetLocationModifiedByUser()
true if the location was modified by the user; otherwise, false.
Gets the component tree handler for this RadDesktopAlert.
public override IComponentTreeHandler GetOwnedTreeHandler()
The IComponentTreeHandler for this component.
Overrides:
Calculates and returns the size of the popup based on the fixed size or content requirements.
Hides the alert popup from the screen.
public void Hide()
Handles location change requests for the alert.
protected virtual void OnLocationChangeRequested(Point alertLocation)
The new location for the alert.
Handles property change notifications and updates the popup theme if needed.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the property that changed.
Overrides:
Raises the Closed event.
protected virtual void OnPopupClosed(object sender, RadPopupClosedEventArgs args)
The source of the event.
argsRadPopupClosedEventArgsA RadPopupClosedEventArgs that contains the event data.
Raises the Closing event.
protected virtual void OnPopupClosing(object sender, RadPopupClosingEventArgs args)
The source of the event.
argsRadPopupClosingEventArgsA RadPopupClosingEventArgs that contains the event data.
Raises the Opening event.
protected virtual void OnPopupOpening(object sender, RadPopupOpeningEventArgs args)
The source of the event.
argsRadPopupOpeningEventArgsA RadPopupOpeningEventArgs that contains the event data.
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.
public void ResetLocationModifier()
Displays the alert popup on the screen at the specified location.
public void Show()
Events
Occurs when the alert's popup has been closed.
public event RadPopupClosedEventHandler Closed
Occurs when the alert's popup is about to be closed. The closing action can be canceled by modifying the event arguments.
public event RadPopupClosingEventHandler Closing
Occurs when the alert's popup has been opened.
public event RadPopupOpenedEventHandler Opened
Occurs when the alert's popup is about to be opened. The opening action can be canceled by modifying the event arguments.
public event RadPopupOpeningEventHandler Opening