New to Telerik UI for WPFStart a free 30-day trial

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:

C#
[TelerikToolboxCategory("Navigation")]
public class RadAlert : ContentControl

Inheritance: objectRadAlert

Derived Classes: RadConfirm

Constructors

C#
public RadAlert()

Fields

IconTemplateProperty

DependencyProperty

Identifies the IconTemplate dependency property.

C#
public static readonly DependencyProperty IconTemplateProperty

Properties

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

C#
public DialogParameters DialogParams { get; }

IconTemplate

DataTemplate

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

C#
public DataTemplate IconTemplate { get; set; }

Gets or sets the window that hosts the alert.

C#
protected RadWindow ParentWindow { get; }
Property Value:

The parent window.

Methods

Configures RadAlert according to the RadWindow.

C#
public virtual void Configure(RadWindow window, DialogParameters pars)
Parameters:windowRadWindow

RadWindow in which the RadPrompt will appear.

parsDialogParameters

Structure that holds all possible parameters for customizing dialog window.

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

C#
public override void OnApplyTemplate()

Raises the event and sets from the active theme.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Raises the event.

C#
protected virtual void OnOk(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

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.

C#
protected virtual void SetupBindingsAndCommands()

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

C#
protected virtual void SetupDefaultFocusedElement()

Events

Occurs when the user presses the accept button.

C#
public event EventHandler Ok