In This Article

UserPromptWindow Class

Defines a Window which can host a UserPromptControl.

public class UserPromptWindow : Window, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IWindowService
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ContentControl Window Object

Properties

DefaultTitle

Gets or sets the default value to be used for Title when an explicit title is not defined.

public static string DefaultTitle { get; set; }

Property Value

String

Remarks

When set to null, a default title will be derived from the kind of icon, if any, displayed on the prompt (e.g. Error or Warning).

Methods

OnActivated(EventArgs)

Raises the Activated event.

protected override void OnActivated(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnClosed(EventArgs)

Raises the Closed event.

protected override void OnClosed(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnCreateAutomationPeer()

Creates an appropriate UserPromptWindowAutomationPeer for this control as part of the WPF infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

A new instance of UserPromptWindowAutomationPeer.

ShowDialog(UserPromptControl)

Shows a user prompt as a modal dialog with a default title and owner window.

public static UserPromptStandardResult ShowDialog(UserPromptControl userPromptControl)
Parameter Type Description
userPromptControl UserPromptControl

The control which defines the prompt to be displayed.

Returns

UserPromptStandardResult:

One of the UserPromptStandardResult values indicating the user's response to the prompt.

ShowDialog(UserPromptControl, String)

Shows a user prompt as a modal dialog with a default owner window.

public static UserPromptStandardResult ShowDialog(UserPromptControl userPromptControl, string title)
Parameter Type Description
userPromptControl UserPromptControl

The control which defines the prompt to be displayed.

title String

The title of the window. When null, a default title may be assigned.

Returns

UserPromptStandardResult:

One of the UserPromptStandardResult values indicating the user's response to the prompt.

ShowDialog(UserPromptControl, String, Window)

Shows a user prompt as a modal dialog.

public static UserPromptStandardResult ShowDialog(UserPromptControl userPromptControl, string title, Window owner)
Parameter Type Description
userPromptControl UserPromptControl

The control which defines the prompt to be displayed.

title String

The title of the window. When null, a default title may be assigned.

owner Window

The window which is the owner of the dialog. When null, a default owner will be assigned.

Returns

UserPromptStandardResult:

One of the UserPromptStandardResult values indicating the user's response to the prompt.

ShowDialog(UserPromptControl, String, Window, Action<UserPromptWindow>)

Shows a user prompt as a modal dialog.

public static UserPromptStandardResult ShowDialog(UserPromptControl userPromptControl, string title, Window owner, Action<UserPromptWindow> initializeAction)
Parameter Type Description
userPromptControl UserPromptControl

The control which defines the prompt to be displayed.

title String

The title of the window. When null, a default title may be assigned.

owner Window

The window which is the owner of the dialog. When null, a default owner will be assigned.

initializeAction Action<UserPromptWindow>

An optional action which will be called to initialize the UserPromptWindow before it is displayed.

Returns

UserPromptStandardResult:

One of the UserPromptStandardResult values indicating the user's response to the prompt.

Inherited Members

Extension Methods