Table of Contents

Class TwDialogOptions

Namespace
TwBlazor.Models
Assembly
TwBlazor.dll

Customization options for a dialog shown via ITwDialogService.

public record TwDialogOptions : IEquatable<TwDialogOptions>
Inheritance
TwDialogOptions
Implements
Inherited Members

Constructors

TwDialogOptions()

public TwDialogOptions()

TwDialogOptions(TwDialogOptions)

protected TwDialogOptions(TwDialogOptions original)

Parameters

original TwDialogOptions

Properties

BackdropClass

Gets or sets additional custom CSS classes applied to the backdrop/overlay element.

public string? BackdropClass { get; init; }

Property Value

string

BackdropClick

Gets or sets whether the dialog can be closed by clicking the backdrop.

public bool? BackdropClick { get; init; }

Property Value

bool?

Remarks

Defaults to true when not set.

Class

Gets or sets additional custom CSS classes applied to the dialog surface.

public string? Class { get; init; }

Property Value

string

CloseButton

Gets or sets whether a close button is shown in the top-right corner of the dialog.

public bool? CloseButton { get; init; }

Property Value

bool?

Remarks

Defaults to true when not set. Ignored when NoHeader is true.

CloseOnEscapeKey

Gets or sets whether the dialog can be closed by pressing the Escape key.

public bool? CloseOnEscapeKey { get; init; }

Property Value

bool?

Remarks

Defaults to true when not set.

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

FullScreen

Gets or sets whether the dialog stretches to fill the entire screen.

public bool? FullScreen { get; init; }

Property Value

bool?

Remarks

Defaults to false. When true, MaxWidth and FullWidth are ignored.

FullWidth

Gets or sets whether the dialog stretches to fill its MaxWidth boundary.

public bool? FullWidth { get; init; }

Property Value

bool?

Remarks

Defaults to false.

MaxWidth

Gets or sets the maximum width of the dialog.

public DialogMaxWidth? MaxWidth { get; init; }

Property Value

DialogMaxWidth?

Remarks

Defaults to Small when not set.

NoHeader

Gets or sets whether the dialog header (title and close button) is hidden.

public bool? NoHeader { get; init; }

Property Value

bool?

Remarks

Defaults to false when not set.

Position

Gets or sets the screen position of the dialog.

public DialogPosition? Position { get; init; }

Property Value

DialogPosition?

Remarks

Defaults to Center when not set.

Rounded

Gets or sets the border radius override for this dialog instance.

public Rounded? Rounded { get; init; }

Property Value

Rounded?

Remarks

If not set, falls back to DialogRounded, then the global default.

Shadow

Gets or sets the shadow override for this dialog instance.

public Shadow? Shadow { get; init; }

Property Value

Shadow?

Remarks

If not set, falls back to DialogShadow, then the global default.

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(TwDialogOptions?)

public virtual bool Equals(TwDialogOptions? other)

Parameters

other TwDialogOptions

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TwDialogOptions?, TwDialogOptions?)

public static bool operator ==(TwDialogOptions? left, TwDialogOptions? right)

Parameters

left TwDialogOptions
right TwDialogOptions

Returns

bool

operator !=(TwDialogOptions?, TwDialogOptions?)

public static bool operator !=(TwDialogOptions? left, TwDialogOptions? right)

Parameters

left TwDialogOptions
right TwDialogOptions

Returns

bool