ClassRadWindow
This class represents an interactive window and provides static methods for showing standard dialog windows - Alert, Confirm and Prompt.
Definition
Namespace:Telerik.UI.Xaml.Controls
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public class RadWindow : WindowBase, INotifyLayoutChange, IDragAware
Inheritance: objectHeaderedContentControlWindowBaseRadWindow
Derived Classes:
Implements:
Inherited Members
Constructors
RadWindow()
Initializes a new instance of the RadWindow class.
Declaration
public RadWindow()
Remarks
Use this constructor to create an instance of the RadWindow. In order for the RadWindow to be displayed, it is not necessary to add it to the visual tree.
Example
RadWindow window = new RadWindow();
Dim window As RadWindow = New RadWindow
Fields
BorderBackgroundProperty
Identifies the
Declaration
public static readonly DependencyProperty BorderBackgroundProperty
Field Value
DependencyProperty
DialogResultProperty
Identifies the
Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
DependencyProperty
IconProperty
Identifies the
Declaration
public static readonly DependencyProperty IconProperty
Field Value
DependencyProperty
IconTemplateProperty
Identifies the
Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
DependencyProperty
IsRestrictedProperty
Identifies the
Declaration
public static readonly DependencyProperty IsRestrictedProperty
Field Value
DependencyProperty
IsRestrictedWhenMaximizedProperty
Identifies the
Declaration
public static readonly DependencyProperty IsRestrictedWhenMaximizedProperty
Field Value
DependencyProperty
ModalBackgroundProperty
Identifies the
Declaration
public static readonly DependencyProperty ModalBackgroundProperty
Field Value
DependencyProperty
PromptResultProperty
Identifies the
Declaration
public static readonly DependencyProperty PromptResultProperty
Field Value
DependencyProperty
ResponseButtonProperty
Identifies the
Declaration
public static readonly DependencyProperty ResponseButtonProperty
Field Value
DependencyProperty
RestoreMinimizedLocationProperty
Identifies the
Declaration
public static readonly DependencyProperty RestoreMinimizedLocationProperty
Field Value
DependencyProperty
RestrictedAreaMarginProperty
Identifies the
Declaration
public static readonly DependencyProperty RestrictedAreaMarginProperty
Field Value
DependencyProperty
WindowStartupLocationProperty
Identifies the
Declaration
public static readonly DependencyProperty WindowStartupLocationProperty
Field Value
DependencyProperty
Properties
BorderBackground
Gets or sets a brush to be used to draw the title of RadWindow. This is a dependency property.
Declaration
public Brush BorderBackground { get; set; }
Property Value
Brush
DefaultSizeRatio
Gets a size ratio when the window has infinity size and it is not restricted. The window size depends on root size and the default ratio.
DialogResult
Gets or sets a DialogResult value for the RadWindow. This is a dependency property.
Icon
Gets or sets the Icon image to appear in the RadWindow title bar. This is a dependency property.
IconTemplate
Gets or sets the IconTemplate property. This is a dependency property.
Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
DataTemplate
IsRestricted
Gets or sets a value indicating whether this instance is restricted.
Declaration
public bool IsRestricted { get; set; }
Property Value
True if this instance is restricted; otherwise, false.
IsRestrictedWhenMaximized
Gets or sets whether when maximized the window to be restricted.
Declaration
public bool IsRestrictedWhenMaximized { get; set; }
Property Value
ModalBackground
Gets or sets a brush for the modal background of RadWindow. This is a dependency property.
Declaration
public Brush ModalBackground { get; set; }
Property Value
Brush
OutOfBrowserOwner
Gets or set the System.Windows.Window owner that hosts the WindowBase in OOB applications.
Declaration
public Window OutOfBrowserOwner { get; set; }
Property Value
Window
PromptResult
Gets or sets a PromptResult value for the RadWindow. This is a dependency property.
RestoreMinimizedLocation
Gets or sets the value which determines whether the window preserves its size and location when WindowState property is changed. This is a dependency property.
Declaration
public bool RestoreMinimizedLocation { get; set; }
Property Value
RestrictedAreaMargin
Gets or sets the restricted area margin.
Declaration
public Thickness RestrictedAreaMargin { get; set; }
Property Value
Thickness
The restricted area margin.
WindowStartupLocation
Gets or sets a WindowStartupLocation value for the RadWindow. This is a dependency property.
Declaration
public WindowStartupLocation WindowStartupLocation { get; set; }
Property Value
Methods
ChangeVisualState(bool)
Updates the visual state of the control.
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
Indicates whether transitions should be used.
Overrides
GetParentRadWindow(DependencyObject)
This walks the visual tree for a parent of a specific type.
Declaration
public static RadWindow GetParentRadWindow(DependencyObject child)
Parameters
child
DependencyObject
The object which parent is searched.
Returns
GetResponseButton(DependencyObject)
Gets the response button.
Declaration
public static ResponseButton GetResponseButton(DependencyObject button)
Parameters
button
DependencyObject
The button.
Returns
GetWindowOwner()
Declaration
protected override ContentControl GetWindowOwner()
Returns
ContentControl
Overrides
GetWindowStartupLocation()
Declaration
protected override WindowStartupLocation GetWindowStartupLocation()
Returns
Overrides
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
Declaration
protected override void OnApplyTemplate()
Overrides
OnClosed()
Declaration
protected override void OnClosed()
Overrides
OnClosed(WindowClosedEventArgs)
Raises the event.
Declaration
protected virtual void OnClosed(WindowClosedEventArgs args)
Parameters
args
The WindowClosedEventArgs instance containing the event data.
OnPreviewClosed(WindowPreviewClosedEventArgs)
Raises the event.
Declaration
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)
Parameters
args
The WindowPreviewClosedEventArgs instance containing the event data.
OnPreviewKeyDown(KeyRoutedEventArgs)
Declaration
protected override void OnPreviewKeyDown(KeyRoutedEventArgs e)
Parameters
e
KeyRoutedEventArgs
OnWindowStateChanged(EventArgs)
Raises the event.
Declaration
protected override void OnWindowStateChanged(EventArgs args)
Parameters
args
The System.Windows.RoutedEventArgs instance containing the event data.
Overrides
SetResponseButton(DependencyObject, ResponseButton)
Sets the response button.
Declaration
public static void SetResponseButton(DependencyObject button, ResponseButton value)
Parameters
button
DependencyObject
The button.
value
The ResponseButton value.
ShouldFocusOnActivate()
Declaration
protected override bool ShouldFocusOnActivate()
Returns
Overrides
Show()
Opens RadWindow in case it hasn't been already opened.
Declaration
public void Show()
Example
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.Show();
Dim window As RadWindow = New RadWindow
window.Height = 100
window.Width = 100
window.Header = "RadWindow"
window.Content = "This is your content"
window.Show()
ShowDialog()
Opens modal RadWindow in case it hasn't been already opened.
Declaration
public void ShowDialog()
Example
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.ShowDialog();
Dim window As RadWindow = New RadWindow
window.Height = 100
window.Width = 100
window.Header = "RadWindow"
window.Content = "This is your content"
window.ShowDialog()
Events
Closed
Occurs when the RadWindow is closed.
Declaration
public event EventHandler<WindowClosedEventArgs> Closed
Event Value
Remarks
The event is raised right next after the
PreviewClosed
Occurs when the RadWindow is closing.
Declaration
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed
Event Value
Remarks
The event is raised whenever the