DialogOption

A selectable action shown in a dialog.
public readonly record struct DialogOption

Constructors

Creates a dialog option.

public DialogOption(
  string text,
  bool isDestructive = false)
ParameterSummary
string textThe option's title.
(optional) bool isDestructiveWhether the option is styled as destructive.

Properties

IsDestructive

Whether the option is styled as destructive.

Type: bool

public bool IsDestructive { get; }

Text

The option's title.

Type: string

public string Text { get; }

Operators

Implicit DialogOption(string)

Converts a string into a standard dialog option.

public static implicit operator DialogOption(
  string text)
ParameterSummary
string textThe option's title.

Returns

  • DialogOption: A standard dialog option with the supplied title.