In This Article

UserPromptBuilder Class

Defines a builder for configuring and showing user prompts using a UserPromptControl.

public sealed class UserPromptBuilder
Inheritance:
object object

Properties

AutoSize

When true, the size of the UserPromptControl will be automatically set based on its message content. When null, the size with be automatically set only when string-based content is defined.

public bool? AutoSize { get; }

Property Value

bool?

Remarks

The default value is null.

See Also

AutoSizeMinimumWidth

When AutoSize is true, defines the preferred width of the UserPromptControl.

public double AutoSizeMinimumWidth { get; }

Property Value

double

Remarks

The default value is 500.

See Also

ButtonItemsClipboardText

The value to be assigned to the ButtonItemsClipboardText property of the UserPromptControl created by the builder.

public string? ButtonItemsClipboardText { get; }

Property Value

string

ButtonItemsHorizontalAlignment

The value to be assigned to the ButtonItemsHorizontalAlignment property of the UserPromptControl created by the builder.

public HorizontalAlignment? ButtonItemsHorizontalAlignment { get; }

Property Value

HorizontalAlignment?

ButtonStyle

The value to be assigned to ButtonStyle.

public Style? ButtonStyle { get; }

Property Value

Style

CheckBoxContentClipboardText

The value to be assigned to the CheckBoxContentClipboardText property of the UserPromptControl created by the builder.

public string? CheckBoxContentClipboardText { get; }

Property Value

string

CheckBoxContentTemplate

The value to be assigned to the CheckBoxContentTemplate property of the UserPromptControl created by the builder.

public DataTemplate? CheckBoxContentTemplate { get; }

Property Value

DataTemplate

CloseResult

The value to be assigned to the CloseResult property of the UserPromptControl created by the builder.

public UserPromptStandardResult? CloseResult { get; }

Property Value

UserPromptStandardResult?

ContentClipboardText

The value to be assigned to the ContentClipboardText property of the UserPromptControl created by the builder.

public string? ContentClipboardText { get; }

Property Value

string

DefaultResult

The value to be assigned to the DefaultResult property of the UserPromptControl created by the builder.

public UserPromptStandardResult? DefaultResult { get; }

Property Value

UserPromptStandardResult?

ExpandedInformationCollapsedHeaderText

The value to be assigned to the ExpandedInformationCollapsedHeaderText property of the UserPromptControl created by the builder.

public string? ExpandedInformationCollapsedHeaderText { get; }

Property Value

string

ExpandedInformationContentClipboardText

The value to be assigned to the ExpandedInformationContentClipboardText property of the UserPromptControl created by the builder.

public string? ExpandedInformationContentClipboardText { get; }

Property Value

string

ExpandedInformationContentTemplate

The value to be assigned to the ExpandedInformationContentTemplate property of the UserPromptControl created by the builder.

public DataTemplate? ExpandedInformationContentTemplate { get; }

Property Value

DataTemplate

ExpandedInformationExpandedHeaderText

The value to be assigned to the ExpandedInformationExpandedHeaderText property of the UserPromptControl created by the builder.

public string? ExpandedInformationExpandedHeaderText { get; }

Property Value

string

FallbackTitle

The value to be used for user prompt titles (e.g., Title when displayed as a dialog) when an explicit title is not defined and one cannot be inferred.

public static string? FallbackTitle { get; set; }

Property Value

string

See Also

FooterClipboardText

The value to be assigned to the FooterClipboardText property of the UserPromptControl created by the builder.

public string? FooterClipboardText { get; }

Property Value

string

FooterImage

The value to be assigned to the FooterImageSource property of the UserPromptControl created by the builder.

public ImageSource? FooterImage { get; }

Property Value

ImageSource

FooterTemplate

The value to be assigned to the FooterTemplate property of the UserPromptControl created by the builder.

public DataTemplate? FooterTemplate { get; }

Property Value

DataTemplate

HeaderBackground

The value to be assigned to the HeaderBackground property of the UserPromptControl created by the builder.

public Brush? HeaderBackground { get; }

Property Value

Brush

HeaderBorderBrush

The value to be assigned to the HeaderBorderBrush property of the UserPromptControl created by the builder.

public Brush? HeaderBorderBrush { get; }

Property Value

Brush

HeaderBorderThickness

The value to be assigned to the HeaderBorderThickness property of the UserPromptControl created by the builder.

public Thickness? HeaderBorderThickness { get; }

Property Value

Thickness?

HeaderClipboardText

The value to be assigned to the HeaderClipboardText property of the UserPromptControl created by the builder.

public string? HeaderClipboardText { get; }

Property Value

string

HeaderFontSize

The value to be assigned to the HeaderFontSize property of the UserPromptControl created by the builder.

public double? HeaderFontSize { get; }

Property Value

double?

HeaderForeground

The value to be assigned to the HeaderForeground property of the UserPromptControl created by the builder.

public Brush? HeaderForeground { get; }

Property Value

Brush

HeaderTemplate

The value to be assigned to the HeaderTemplate property of the UserPromptControl created by the builder.

public DataTemplate? HeaderTemplate { get; }

Property Value

DataTemplate

HelpCommand

The value to be assigned to the HelpCommand property of the UserPromptControl created by the builder.

public ICommand? HelpCommand { get; }

Property Value

ICommand

HelpCommandParameter

The value to be assigned to the HelpCommandParameter property of the UserPromptControl created by the builder.

public object? HelpCommandParameter { get; }

Property Value

object

HorizontalScrollBarVisibility

The value to be assigned to the HorizontalScrollBarVisibility property of the UserPromptControl created by the builder.

public ScrollBarVisibility? HorizontalScrollBarVisibility { get; }

Property Value

ScrollBarVisibility?

Instance

The UserPromptControl instance that is being configured.

public UserPromptControl? Instance { get; }

Property Value

UserPromptControl

Remarks

This property is not populated until ActiproSoftware.Windows.Controls.UserPromptBuilder.Build is initiated by the Show() or BuildWithoutShowing() methods.

IsChecked

The value to be assigned to the IsChecked property of the UserPromptControl created by the builder.

public bool? IsChecked { get; }

Property Value

bool?

IsExpanded

The value to be assigned to the IsExpanded property of the UserPromptControl created by the builder.

public bool? IsExpanded { get; }

Property Value

bool?

Owner

The owner to be used when showing the prompt.

public Window? Owner { get; }

Property Value

Window

StandardButtons

The value to be assigned to the StandardButtons property of the UserPromptControl created by the builder.

public UserPromptStandardButtons? StandardButtons { get; }

Property Value

UserPromptStandardButtons?

StandardStatusImage

The value to be assigned to the StandardStatusImage property of the UserPromptControl created by the builder.

public UserPromptStandardImage? StandardStatusImage { get; }

Property Value

UserPromptStandardImage?

StatusImage

The value to be assigned to the StatusImageSource property of the UserPromptControl created by the builder.

public ImageSource? StatusImage { get; }

Property Value

ImageSource

Tag

An arbitrary object value that can be used to store custom information.

public object? Tag { get; }

Property Value

object

Title

The value to be assigned as the title for a window displaying the prompt.

public string? Title { get; }

Property Value

string

See Also

VerticalScrollBarVisibility

The value to be assigned to the VerticalScrollBarVisibility property of the UserPromptControl created by the builder.

public ScrollBarVisibility? VerticalScrollBarVisibility { get; }

Property Value

ScrollBarVisibility?

WindowStartupLocation

The value to be assigned to UserPromptWindow.WindowStartupLocation.

public WindowStartupLocation? WindowStartupLocation { get; }

Property Value

WindowStartupLocation?:

One of the WindowStartupLocation values. When null, user prompts that fit within the bounds of their owner window will center on their owner and, when too large, will center on the owner's screen instead.

Methods

AfterBuild(Action<UserPromptBuilder>?)

Registers a delegate to be called after the build is complete.

public UserPromptBuilder AfterBuild(Action<UserPromptBuilder>? callback)
Parameter Type Description
callback Action<UserPromptBuilder>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

AfterInitialize(Action<UserPromptBuilder>?)

Registers a delegate to be called after the Instance is created, but before the build starts.

public UserPromptBuilder AfterInitialize(Action<UserPromptBuilder>? callback)
Parameter Type Description
callback Action<UserPromptBuilder>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

AfterInitializeWindow(Action<UserPromptWindow>?)

Registers a delegate to be called after a UserPromptWindow is initialized that will host the UserPromptControl when it is shown as a dialog.

public UserPromptBuilder AfterInitializeWindow(Action<UserPromptWindow>? callback)
Parameter Type Description
callback Action<UserPromptWindow>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

AfterShow(Action<UserPromptBuilder, UserPromptStandardResult>?)

Registers a delegate to be called after the prompt is shown and a response is indicated.

public UserPromptBuilder AfterShow(Action<UserPromptBuilder, UserPromptStandardResult>? callback)
Parameter Type Description
callback Action<UserPromptBuilder, UserPromptStandardResult>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

BeforeShow(Action<UserPromptBuilder>?)

Registers a delegate to be called before the prompt is shown.

public UserPromptBuilder BeforeShow(Action<UserPromptBuilder>? callback)
Parameter Type Description
callback Action<UserPromptBuilder>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

BuildWithoutShowing()

Creates and configures a UserPromptControl based on the current builder configuration.

public UserPromptControl BuildWithoutShowing()

Returns

UserPromptControl:

The UserPromptControl created by this builder.

Exceptions

Type Condition
InvalidOperationException

Thrown if an instance of UserPromptControl has already been built.

Configure()

Initializes a new instance of UserPromptBuilder.

public static UserPromptBuilder Configure()

Returns

UserPromptBuilder:

A new instance of UserPromptBuilder.

OnResponding(Action<UserPromptBuilder, UserPromptResponseEventArgs>?)

Registers a delegate to be called when a user is responding to a prompt.

public UserPromptBuilder OnResponding(Action<UserPromptBuilder, UserPromptResponseEventArgs>? callback)
Parameter Type Description
callback Action<UserPromptBuilder, UserPromptResponseEventArgs>

The callback, which will be invoked after any already registered callbacks are invoked.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

RegisterGlobalConfigureCallback(Action<UserPromptBuilder>?)

Registers a global delegate to be called to configure a new instance of UserPromptBuilder.

public static void RegisterGlobalConfigureCallback(Action<UserPromptBuilder>? callback)
Parameter Type Description
callback Action<UserPromptBuilder>

The callback, which will be invoked immediately after the instance is created and before any instance-specific configuration can be applied.

Show()

Creates and configures a UserPromptControl based on the current builder configuration. The prompt is then shown to the user to await a response.

public UserPromptStandardResult Show()

Returns

UserPromptStandardResult:

The UserPromptStandardResult indicated by the user.

Exceptions

Type Condition
InvalidOperationException

Thrown if an instance of UserPromptControl has already been built.

WithAutoSize(bool?, double?)

Sets the AutoSize and AutoSizeMinimumWidth property values.

public UserPromptBuilder WithAutoSize(bool? autoSize, double? minimumWidth = null)
Parameter Type Description
autoSize bool?

The value to assign to AutoSize.

minimumWidth double?

The value to assign to AutoSizeMinimumWidth, if any.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithButton(UserPromptButtonBuilder)

Adds an explicit button configuration.

public UserPromptBuilder WithButton(UserPromptButtonBuilder buttonBuilder)
Parameter Type Description
buttonBuilder UserPromptButtonBuilder

A UserPromptButtonBuilder that will build the button.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

Exceptions

Type Condition
ArgumentNullException

WithButton(UserPromptStandardResult, ICommand?, object?, string?, Action<UserPromptButtonBuilder>?)

Adds an explicit button configuration.

public UserPromptBuilder WithButton(UserPromptStandardResult result, ICommand? command = null, object? commandParameter = null, string? label = null, Action<UserPromptButtonBuilder>? afterInitialize = null)
Parameter Type Description
result UserPromptStandardResult

The result associated with the button.

command ICommand

An optional command associated with the button.

commandParameter object

An optional command parameter associated with the button.

label string

An optional label to use as content for the button; otherwise the content is coerced from the result.

afterInitialize Action<UserPromptButtonBuilder>

An optional delegate to be called after the UserPromptButtonBuilder initializes the Button instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

Exceptions

Type Condition
ArgumentNullException

WithButton(Action<UserPromptButtonBuilder>)

Adds an explicit button configuration.

public UserPromptBuilder WithButton(Action<UserPromptButtonBuilder> configure)
Parameter Type Description
configure Action<UserPromptButtonBuilder>

A delegate to configure a UserPromptButtonBuilder for the button.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

Exceptions

Type Condition
ArgumentNullException

WithButtonItemsClipboardText(string?)

Sets the ButtonItemsClipboardText property value.

public UserPromptBuilder WithButtonItemsClipboardText(string? text)
Parameter Type Description
text string

The value to set.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithButtonItemsHorizontalAlignment(HorizontalAlignment?)

Sets the ButtonItemsHorizontalAlignment property value.

public UserPromptBuilder WithButtonItemsHorizontalAlignment(HorizontalAlignment? alignment)
Parameter Type Description
alignment HorizontalAlignment?

The value to set.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithButtonStyle(Style?)

Sets the ButtonStyle property value.

public UserPromptBuilder WithButtonStyle(Style? buttonStyle)
Parameter Type Description
buttonStyle Style

The value to set.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCheckBox(object?, bool)

Configures the checkbox.

public UserPromptBuilder WithCheckBox(object? content, bool isChecked = false)
Parameter Type Description
content object

The checkbox content.

isChecked bool

The initial value of the IsChecked property.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithCheckBoxContent(Func<UserPromptControl, object?>?)

Sets the checkbox content.

public UserPromptBuilder WithCheckBoxContent(Func<UserPromptControl, object?>? contentFactory)
Parameter Type Description
contentFactory Func<UserPromptControl, object>

A factory method which returns the content and is passed an instance of the current Instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCheckBoxContent(Func<object?>?)

Sets the checkbox content.

public UserPromptBuilder WithCheckBoxContent(Func<object?>? contentFactory)
Parameter Type Description
contentFactory Func<object>

A factory method which returns the content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCheckBoxContent(object?)

Sets the checkbox content.

public UserPromptBuilder WithCheckBoxContent(object? content)
Parameter Type Description
content object

The content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCheckBoxContentClipboardText(string?)

Sets the CheckBoxContentClipboardText property value.

public UserPromptBuilder WithCheckBoxContentClipboardText(string? text)
Parameter Type Description
text string

The text.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCheckBoxContentTemplate(DataTemplate?)

Sets the CheckBoxContentTemplate property value.

public UserPromptBuilder WithCheckBoxContentTemplate(DataTemplate? contentTemplate)
Parameter Type Description
contentTemplate DataTemplate

The template.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithCloseResult(UserPromptStandardResult?)

Sets the CloseResult property value.

public UserPromptBuilder WithCloseResult(UserPromptStandardResult? result)
Parameter Type Description
result UserPromptStandardResult?

The result to be associated with the close button.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithContent(Func<UserPromptControl, object?>?)

Sets the primary message content.

public UserPromptBuilder WithContent(Func<UserPromptControl, object?>? contentFactory)
Parameter Type Description
contentFactory Func<UserPromptControl, object>

A factory method which returns the content and is passed an instance of the current Instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithContent(Func<object?>?)

Sets the primary message content.

public UserPromptBuilder WithContent(Func<object?>? contentFactory)
Parameter Type Description
contentFactory Func<object>

A factory method which returns the content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithContent(object?)

Sets the primary message content.

public UserPromptBuilder WithContent(object? content)
Parameter Type Description
content object

The content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithContentClipboardText(string?)

Sets the ContentClipboardText property value.

public UserPromptBuilder WithContentClipboardText(string? text)
Parameter Type Description
text string

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithDefaultResult(UserPromptStandardResult?)

Sets the DefaultResult property value.

public UserPromptBuilder WithDefaultResult(UserPromptStandardResult? result)
Parameter Type Description
result UserPromptStandardResult?

The result.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformation(string?, string?, object?)

Sets the ExpandedInformationCollapsedHeaderText and ExpandedInformationExpandedHeaderText property values and the content shown when expanded.

public UserPromptBuilder WithExpandedInformation(string? collapsedHeaderText, string? expandedHeaderText, object? expandedContent)
Parameter Type Description
collapsedHeaderText string

The header text when collapsed.

expandedHeaderText string

The header text when expanded.

expandedContent object

The content shown when expanded.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithExpandedInformationContent(Func<UserPromptControl, object?>?)

Sets the expanded information content.

public UserPromptBuilder WithExpandedInformationContent(Func<UserPromptControl, object?>? contentFactory)
Parameter Type Description
contentFactory Func<UserPromptControl, object>

A factory method which returns the content and is passed an instance of the current Instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationContent(Func<object?>?)

Sets the expanded information content.

public UserPromptBuilder WithExpandedInformationContent(Func<object?>? contentFactory)
Parameter Type Description
contentFactory Func<object>

A factory method which returns the content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationContent(object?)

Sets the expanded information content.

public UserPromptBuilder WithExpandedInformationContent(object? content)
Parameter Type Description
content object

The content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationContentClipboardText(string?)

Sets the ExpandedInformationContentClipboardText property value.

public UserPromptBuilder WithExpandedInformationContentClipboardText(string? text)
Parameter Type Description
text string

The text.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationContentTemplate(DataTemplate?)

Sets the ExpandedInformationContentTemplate property value.

public UserPromptBuilder WithExpandedInformationContentTemplate(DataTemplate? contentTemplate)
Parameter Type Description
contentTemplate DataTemplate

The template.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationHeaderText(string?)

Sets the ExpandedInformationCollapsedHeaderText and ExpandedInformationExpandedHeaderText property values to the same value.

public UserPromptBuilder WithExpandedInformationHeaderText(string? headerText)
Parameter Type Description
headerText string

The header text when collapsed or expanded.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithExpandedInformationHeaderText(string?, string?)

public UserPromptBuilder WithExpandedInformationHeaderText(string? collapsedHeaderText, string? expandedHeaderText)
Parameter Type Description
collapsedHeaderText string

The header text when collapsed.

expandedHeaderText string

The header text when expanded.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterClipboardText(string?)

Sets the FooterClipboardText property value.

public UserPromptBuilder WithFooterClipboardText(string? text)
Parameter Type Description
text string

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterContent(Func<UserPromptControl, object?>?)

Sets the footer content.

public UserPromptBuilder WithFooterContent(Func<UserPromptControl, object?>? contentFactory)
Parameter Type Description
contentFactory Func<UserPromptControl, object>

A factory method which returns the content and is passed an instance of the current Instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterContent(Func<object?>?)

Sets the footer content.

public UserPromptBuilder WithFooterContent(Func<object?>? contentFactory)
Parameter Type Description
contentFactory Func<object>

A factory method which returns the content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterContent(object?)

Sets the footer content.

public UserPromptBuilder WithFooterContent(object? content)
Parameter Type Description
content object

The content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterImage(ImageSource?)

Sets the FooterImage property value.

public UserPromptBuilder WithFooterImage(ImageSource? image)
Parameter Type Description
image ImageSource

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithFooterTemplate(DataTemplate?)

Sets the FooterTemplate property value.

public UserPromptBuilder WithFooterTemplate(DataTemplate? contentTemplate)
Parameter Type Description
contentTemplate DataTemplate

The template.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderBackground(Color?)

Sets the HeaderBackground property value to a SolidColorBrush of the given color.

public UserPromptBuilder WithHeaderBackground(Color? color)
Parameter Type Description
color Color?

The color.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderBackground(Brush?)

Sets the HeaderBackground property value.

public UserPromptBuilder WithHeaderBackground(Brush? brush)
Parameter Type Description
brush Brush

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderBorderBrush(Color?)

Sets the HeaderBorderBrush property value to a SolidColorBrush of the given color.

public UserPromptBuilder WithHeaderBorderBrush(Color? color)
Parameter Type Description
color Color?

The color.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderBorderBrush(Brush?)

Sets the HeaderBorderBrush property value.

public UserPromptBuilder WithHeaderBorderBrush(Brush? brush)
Parameter Type Description
brush Brush

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderBorderThickness(Thickness?)

Sets the HeaderBorderThickness property value.

public UserPromptBuilder WithHeaderBorderThickness(Thickness? thickness)
Parameter Type Description
thickness Thickness?

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderClipboardText(string?)

Sets the HeaderClipboardText property value.

public UserPromptBuilder WithHeaderClipboardText(string? text)
Parameter Type Description
text string

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderContent(Func<UserPromptControl, object?>?)

Sets the header content.

public UserPromptBuilder WithHeaderContent(Func<UserPromptControl, object?>? contentFactory)
Parameter Type Description
contentFactory Func<UserPromptControl, object>

A factory method which returns the content and is passed an instance of the current Instance.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithHeaderContent(Func<object?>?)

Sets the content content.

public UserPromptBuilder WithHeaderContent(Func<object?>? contentFactory)
Parameter Type Description
contentFactory Func<object>

A factory method which returns the content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithHeaderContent(object?)

Sets the header content.

public UserPromptBuilder WithHeaderContent(object? content)
Parameter Type Description
content object

The content.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

WithHeaderFontSize(double?)

Sets the HeaderFontSize property value.

public UserPromptBuilder WithHeaderFontSize(double? fontSize)
Parameter Type Description
fontSize double?

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderForeground(Color?)

Sets the HeaderForeground property value to a SolidColorBrush of the given color.

public UserPromptBuilder WithHeaderForeground(Color? color)
Parameter Type Description
color Color?

The color.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderForeground(Brush?)

Sets the HeaderForeground property value.

public UserPromptBuilder WithHeaderForeground(Brush? brush)
Parameter Type Description
brush Brush

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHeaderTemplate(DataTemplate?)

Sets the HeaderTemplate property value.

public UserPromptBuilder WithHeaderTemplate(DataTemplate? contentTemplate)
Parameter Type Description
contentTemplate DataTemplate

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHelpCommand(Action?)

Configures the HelpCommand property to perform the given action.

public UserPromptBuilder WithHelpCommand(Action? helpAction)
Parameter Type Description
helpAction Action

The help action.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithHelpCommand(ICommand?, object?)

Sets the HelpCommand and HelpCommandParameter property values.

public UserPromptBuilder WithHelpCommand(ICommand? helpCommand, object? helpCommandParameter = null)
Parameter Type Description
helpCommand ICommand

The help command.

helpCommandParameter object

The parameter, if any, to pass to the help command.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithIsChecked(Func<bool>, Action<bool>)

Synchronizes the initial and final values of the IsChecked property.

public UserPromptBuilder WithIsChecked(Func<bool> getter, Action<bool> setter)
Parameter Type Description
getter Func<bool>

The delegate which returns the initial value to assign to the IsChecked property.

setter Action<bool>

The delegate which is called with the final static of the IsChecked property.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

Exceptions

Type Condition
ArgumentNullException

WithIsChecked(bool?)

Sets the IsChecked property value.

public UserPromptBuilder WithIsChecked(bool? isChecked)
Parameter Type Description
isChecked bool?

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithIsExpanded(bool?)

Sets the IsExpanded property value.

public UserPromptBuilder WithIsExpanded(bool? isExpanded)
Parameter Type Description
isExpanded bool?

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithOwner(Window?)

Sets the Owner property value.

public UserPromptBuilder WithOwner(Window? owner)
Parameter Type Description
owner Window

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithScrollBarVisibility(ScrollBarVisibility?)

public UserPromptBuilder WithScrollBarVisibility(ScrollBarVisibility? visibility)
Parameter Type Description
visibility ScrollBarVisibility?

The horizontal and vertical visibility.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithScrollBarVisibility(ScrollBarVisibility?, ScrollBarVisibility?)

public UserPromptBuilder WithScrollBarVisibility(ScrollBarVisibility? horizontal, ScrollBarVisibility? vertical)
Parameter Type Description
horizontal ScrollBarVisibility?

The horizontal visibility.

vertical ScrollBarVisibility?

The vertical visibility.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithStandardButtons(UserPromptStandardButtons?)

Sets the StandardButtons property value.

public UserPromptBuilder WithStandardButtons(UserPromptStandardButtons? standardButtons)
Parameter Type Description
standardButtons UserPromptStandardButtons?

The value.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithStatusImage(UserPromptStandardImage?)

Sets the StandardStatusImage property value.

public UserPromptBuilder WithStatusImage(UserPromptStandardImage? image)
Parameter Type Description
image UserPromptStandardImage?

The standard image.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithStatusImage(ImageSource?)

Sets the StatusImage property value.

public UserPromptBuilder WithStatusImage(ImageSource? image)
Parameter Type Description
image ImageSource

The image.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithTag(object?)

Sets the Tag property value.

public UserPromptBuilder WithTag(object? tag)
Parameter Type Description
tag object

The value to set.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithTitle(string?)

Sets the Title property value.

public UserPromptBuilder WithTitle(string? title)
Parameter Type Description
title string

The value to set.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

See Also

WithWindowStartupLocation(WindowStartupLocation?)

Sets the WindowStartupLocation property value.

public UserPromptBuilder WithWindowStartupLocation(WindowStartupLocation? startupLocation)
Parameter Type Description
startupLocation WindowStartupLocation?

The value to set. When null, user prompts that fit within the bounds of their owner window will center on their owner and, when too large, will center on the owner's screen instead.

Returns

UserPromptBuilder:

This builder instance, which can be used for method chaining.

Inherited Members

Extension Methods