Class
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:

cs-api-definition
public class RadDesktopAlert : RadComponent, INotifyPropertyChanged, ICustomTypeDescriptor, IComponent, IDisposable

Inheritance: objectDisposableObjectRadObjectRadComponentRadDesktopAlert

Implements: IComponentICustomTypeDescriptorIDisposableINotifyPropertyChanged

Inherited Members RadComponent.ToString()RadComponent.GetService(Type)RadComponent.CanRaiseEventsRadComponent.ContainerRadComponent.DesignModeRadComponent.SiteRadComponent.ThemeNameRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing

Constructors

RadDesktopAlert()

Initializes a new instance of the RadDesktopAlert class.

Declaration

cs-api-definition
public RadDesktopAlert()

RadDesktopAlert(IContainer)

Initializes a new instance of the RadDesktopAlert class with the specified container.

Declaration

cs-api-definition
public RadDesktopAlert(IContainer container)

Parameters

container

IContainer

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.

Declaration

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

Property Value

bool

AutoCloseDelay

Gets or sets the amount of time in seconds after which the alert will be automatically closed.

Declaration

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

Property Value

int

AutoSize

Gets or sets a value indicating whether the control is automatically resized by height to display its entire contents.

Declaration

cs-api-definition
[Browsable(true)]
public virtual bool AutoSize { get; set; }

Property Value

bool

ButtonItems

Gets or sets the items collection containing the button items shown at the bottom part of the desktop alert's popup.

Declaration

cs-api-definition
public RadItemCollection ButtonItems { get; }

Property Value

RadItemCollection

CanMove

Gets or sets a boolean value determining whether the popup can be moved by dragging the caption grip.

Declaration

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

Property Value

bool

CaptionText

Gets or sets the alert's caption text. The caption text is displayed below the moving grip of the alert's popup.

Declaration

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

Property Value

string

ContentImage

Gets or sets the content image of the RadDesktopAlert.

Declaration

cs-api-definition
public Image ContentImage { get; set; }

Property Value

Image

ContentText

Gets or sets the text displayed in the alert popup. This text can be HTML formatted to achieve better appearance.

Declaration

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

Property Value

string

DpiScaleElement

Gets the element used for storing the current DPI scale.

Declaration

cs-api-definition
public RadElement DpiScaleElement { get; }

Property Value

RadElement

FadeAnimationFrames

Gets or sets the count of animation frames for the fade animation.

Declaration

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

Property Value

int

FadeAnimationSpeed

Gets or sets the interval in milliseconds between two animation frames.

Declaration

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

Property Value

int

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

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

Property Value

FadeAnimationType

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.

Declaration

cs-api-definition
public Size FixedSize { get; set; }

Property Value

Size

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.

Declaration

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

Property Value

bool

Opacity

Gets or sets the initial opacity of the alert's popup.

Declaration

cs-api-definition
public float Opacity { get; set; }

Property Value

float

OptionItems

Gets the items collection containing the items added to the options drop-down button of the desktop alert's popup.

Declaration

cs-api-definition
public RadItemCollection OptionItems { get; }

Property Value

RadItemCollection

PlaySound

Gets or sets a boolean value determining whether a sound is played when the alert's popup is shown.

Declaration

cs-api-definition
[Browsable(false)]
public bool PlaySound { get; set; }

Property Value

bool

Popup

Gets an instance of the DesktopAlertPopupclass that represents the popup of the desktop alert.

Declaration

cs-api-definition
[Browsable(false)]
public DesktopAlertPopup Popup { get; }

Property Value

DesktopAlertPopup

PopupAnimation

Gets or sets a boolean value determining whether the alert's popup will be animated.

Declaration

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

Property Value

bool

PopupAnimationDirection

Gets or sets a value determining the direction of the alert's popup animation.

Declaration

cs-api-definition
public RadDirection PopupAnimationDirection { get; set; }

Property Value

RadDirection

PopupAnimationEasing

Gets or sets the type of the drop-down animation easing.

Declaration

cs-api-definition
public RadEasingType PopupAnimationEasing { get; set; }

Property Value

RadEasingType

PopupAnimationFrames

Gets or sets the count of the alert's drop-down animation frames.

Declaration

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

Property Value

int

RightToLeft

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.

Declaration

cs-api-definition
public virtual RightToLeft RightToLeft { get; set; }

Property Value

RightToLeft

One of the RightToLeft values. The default is Inherit.

Exceptions

InvalidEnumArgumentException

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

cs-api-definition
public virtual AlertScreenPosition ScreenPosition { get; set; }

Property Value

AlertScreenPosition

ShowCloseButton

Gets or sets a boolean value determining whether the close button is shown.

Declaration

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

Property Value

bool

ShowOptionsButton

Gets or sets a boolean value determining whether the options button is shown.

Declaration

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

Property Value

bool

ShowPinButton

Gets or sets a boolean value determining whether the pin button is shown.

Declaration

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

Property Value

bool

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

cs-api-definition
[Browsable(false)]
public SystemSound SoundToPlay { get; set; }

Property Value

SystemSound

Methods

CreatePopup()

Creates and returns an instance of the DesktopAlertPopup class that represents the alert's popup.

Declaration

cs-api-definition
protected virtual DesktopAlertPopup CreatePopup()

Returns

DesktopAlertPopup

A new instance of DesktopAlertPopup.

DisposeManagedResources()

Releases the managed resources used by the RadDesktopAlert and optionally releases the unmanaged resources.

Declaration

cs-api-definition
protected override void DisposeManagedResources()

Overrides RadComponent.DisposeManagedResources()

GetLocationModifiedByUser()

Gets a value indicating whether the location has been modified by the user.

Declaration

cs-api-definition
protected virtual bool GetLocationModifiedByUser()

Returns

bool

true if the location was modified by the user; otherwise, false.

GetOwnedTreeHandler()

Gets the component tree handler for this RadDesktopAlert.

Declaration

cs-api-definition
public override IComponentTreeHandler GetOwnedTreeHandler()

Returns

IComponentTreeHandler

The IComponentTreeHandler for this component.

Overrides RadComponent.GetOwnedTreeHandler()

GetPopupSize()

Calculates and returns the size of the popup based on the fixed size or content requirements.

Declaration

cs-api-definition
protected virtual Size GetPopupSize()

Returns

Size

The calculated size for the popup.

Hide()

Hides the alert popup from the screen.

Declaration

cs-api-definition
public void Hide()

OnLocationChangeRequested(Point)

Handles location change requests for the alert.

Declaration

cs-api-definition
protected virtual void OnLocationChangeRequested(Point alertLocation)

Parameters

alertLocation

Point

The new location for the alert.

OnNotifyPropertyChanged(string)

Handles property change notifications and updates the popup theme if needed.

Declaration

cs-api-definition
protected override void OnNotifyPropertyChanged(string propertyName)

Parameters

propertyName

string

The name of the property that changed.

Overrides RadObject.OnNotifyPropertyChanged(string)

OnPopupClosed(object, RadPopupClosedEventArgs)

Raises the Closed event.

Declaration

cs-api-definition
protected virtual void OnPopupClosed(object sender, RadPopupClosedEventArgs args)

Parameters

sender

object

The source of the event.

args

RadPopupClosedEventArgs

A RadPopupClosedEventArgs that contains the event data.

OnPopupClosing(object, RadPopupClosingEventArgs)

Raises the Closing event.

Declaration

cs-api-definition
protected virtual void OnPopupClosing(object sender, RadPopupClosingEventArgs args)

Parameters

sender

object

The source of the event.

args

RadPopupClosingEventArgs

A RadPopupClosingEventArgs that contains the event data.

OnPopupOpened(object, EventArgs)

Raises the Opened event.

Declaration

cs-api-definition
protected virtual void OnPopupOpened(object sender, EventArgs args)

Parameters

sender

object

The source of the event.

args

EventArgs

An EventArgs that contains the event data.

OnPopupOpening(object, RadPopupOpeningEventArgs)

Raises the Opening event.

Declaration

cs-api-definition
protected virtual void OnPopupOpening(object sender, RadPopupOpeningEventArgs args)

Parameters

sender

object

The source of the event.

args

RadPopupOpeningEventArgs

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

cs-api-definition
public void ResetLocationModifier()

Show()

Displays the alert popup on the screen at the specified location.

Declaration

cs-api-definition
public void Show()

Events

Closed

Occurs when the alert's popup has been closed.

Declaration

cs-api-definition
public event RadPopupClosedEventHandler Closed

Event Value

RadPopupClosedEventHandler

Closing

Occurs when the alert's popup is about to be closed. The closing action can be canceled by modifying the event arguments.

Declaration

cs-api-definition
public event RadPopupClosingEventHandler Closing

Event Value

RadPopupClosingEventHandler

Opened

Occurs when the alert's popup has been opened.

Declaration

cs-api-definition
public event RadPopupOpenedEventHandler Opened

Event Value

RadPopupOpenedEventHandler

Opening

Occurs when the alert's popup is about to be opened. The opening action can be canceled by modifying the event arguments.

Declaration

cs-api-definition
public event RadPopupOpeningEventHandler Opening

Event Value

RadPopupOpeningEventHandler