Class
RadAlert

Represents a dialog alert control that provides a customizable interface for displaying alerts to the user. The RadAlert class inherits from ContentControl and allows for the visualization of an icon with the option to define dialog parameters. It includes an Ok event that is triggered when the user interacts with the accept button, and it is designed to be hosted within a RadWindow. The icon area of the dialog can be customized via the IconTemplate property. The Configure method can be used to set up the alert's parameters and its parent window. The control also supports binding commands for button interaction and has functionality to set a default focused button when the dialog is displayed.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Navigation")]
public class RadAlert : ContentControl

Inheritance: objectRadAlert

Derived Classes: RadConfirm

Constructors

RadAlert()

Declaration

cs-api-definition
public RadAlert()

Fields

IconTemplateProperty

Identifies the IconTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconTemplateProperty

Field Value

DependencyProperty

Properties

DialogParams

Gets or sets the dialog parameters, used for initializing the alert.

Declaration

cs-api-definition
public DialogParameters DialogParams { get; }

Property Value

DialogParameters

IconTemplate

Gets or sets the DataTemplate of ContentPresenter that represents the icon area in the dialog.

Declaration

cs-api-definition
public DataTemplate IconTemplate { get; set; }

Property Value

DataTemplate

ParentWindow

Gets or sets the window that hosts the alert.

Declaration

cs-api-definition
protected RadWindow ParentWindow { get; }

Property Value

RadWindow

The parent window.

Methods

Configure(RadWindow, DialogParameters)

Configures RadAlert according to the RadWindow.

Declaration

cs-api-definition
public virtual void Configure(RadWindow window, DialogParameters pars)

Parameters

window

RadWindow

RadWindow in which the RadPrompt will appear.

pars

DialogParameters

Structure that holds all possible parameters for customizing dialog window.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnInitialized(EventArgs)

Raises the event and sets from the active theme.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnOk(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnOk(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

SetupBindingsAndCommands()

This method is called just after the template is applied and is meant to setup the Ok and Cancel buttons. It should be removed for Q3 2011.

Declaration

cs-api-definition
protected virtual void SetupBindingsAndCommands()

SetupDefaultFocusedElement()

This method is called just after the template is applied and is meant to setup the default focused dialog button.

Declaration

cs-api-definition
protected virtual void SetupDefaultFocusedElement()

Events

Ok

Occurs when the user presses the accept button.

Declaration

cs-api-definition
public event EventHandler Ok

Event Value

EventHandler