Table of Contents

Class DialogResult

Namespace
MudBlazor
Assembly
MudBlazor.dll

The result of a user's interaction with a MudDialog.

public class DialogResult
Inheritance
DialogResult
Inherited Members
Extension Methods

Constructors

DialogResult(object?, Type?, bool)

protected DialogResult(object? data, Type? resultType, bool canceled)

Parameters

data object
resultType Type
canceled bool

Properties

Canceled

Indicates whether the user clicked a cancel button.

public bool Canceled { get; }

Property Value

bool

Data

The data included with the result.

public object? Data { get; }

Property Value

object

Remarks

This value is typically a custom object related to the dialog, such as the object which will be affected by the user's response.

DataType

The type of object in the Data property.

public Type? DataType { get; }

Property Value

Type

Methods

Cancel()

The result when the user clicks the cancel button.

public static DialogResult Cancel()

Returns

DialogResult

The dialog result.

Ok<T>(T)

The result when the user clicks the Ok button.

public static DialogResult Ok<T>(T result)

Parameters

result T

The value included.

Returns

DialogResult

The dialog result.

Type Parameters

T

The type of result included.

Ok<T>(T, Type?)

The result when the user clicks the Ok button.

public static DialogResult Ok<T>(T result, Type? dialogType)

Parameters

result T

The value included.

dialogType Type

The type of dialog which the user responded to.

Returns

DialogResult

The dialog result.

Type Parameters

T

The type of result included.