Table of Contents

Class ContentDialogBuilder

Namespace
Artemis.UI.Shared.Services.Builders
Assembly
Artemis.UI.Shared.dll

Represents a builder that can be used to create Fluent UI dialogs.

public class ContentDialogBuilder
Inheritance
object
ContentDialogBuilder

Methods

HavingPrimaryButton(Action<ContentDialogButtonBuilder>)

Changes the primary button of the dialog.

public ContentDialogBuilder HavingPrimaryButton(Action<ContentDialogButtonBuilder> configure)

Parameters

configure Action<ContentDialogButtonBuilder>

An action to configure the button.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

HavingSecondaryButton(Action<ContentDialogButtonBuilder>)

Changes the secondary button of the dialog.

public ContentDialogBuilder HavingSecondaryButton(Action<ContentDialogButtonBuilder> configure)

Parameters

configure Action<ContentDialogButtonBuilder>

An action to configure the button.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

ShowAsync()

Asynchronously shows the content dialog.

public Task<ContentDialogResult> ShowAsync()

Returns

Task<ContentDialogResult>

A task containing the result of the content dialog.

Exceptions

ArtemisSharedUIException

Thrown when the parent window does not contain a panel at its root.

WithCloseButtonText(string?)

Changes the text of the close button of the dialog.

public ContentDialogBuilder WithCloseButtonText(string? text)

Parameters

text string

The new text.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithContent(string?)

Changes the content of the dialog.

public ContentDialogBuilder WithContent(string? content)

Parameters

content string

The new content.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithDefaultButton(ContentDialogButton)

Changes the default button of the dialog that is pressed on enter.

public ContentDialogBuilder WithDefaultButton(ContentDialogButton defaultButton)

Parameters

defaultButton ContentDialogButton

The default button.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithFullScreen()

Changes the dialog to be full screen.

public ContentDialogBuilder WithFullScreen()

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithFullSize()

Changes the dialog to take the full height of the window it's being hosted in.

public ContentDialogBuilder WithFullSize()

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithTitle(string?)

Changes the title of the dialog.

public ContentDialogBuilder WithTitle(string? title)

Parameters

title string

The new title.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

WithViewModel<T>(out T, params object[])

Changes the view model of the content dialog, hosting it inside the dialog.

public ContentDialogBuilder WithViewModel<T>(out T viewModel, params object[] parameters) where T : ContentDialogViewModelBase

Parameters

viewModel T

The resulting view model.

parameters object[]

Optional parameters to pass to the constructor of the view model.

Returns

ContentDialogBuilder

The builder that can be used to further build the dialog.

Type Parameters

T

The type of the view model to host.