MarkupOptions Class

Configures the HTML snapshots of the DOM.

public sealed class MarkupOptions

Constructors

NameDescription
MarkupOptions()

MarkupOptions()

MarkupOptions.cs
public MarkupOptions()

No documentation is available.

Properties

NameDescription
DefaultGets the default options.
IncludeFormStateGets whether the state of the form fields is written as attributes: the value of the text fields (value), the state of the check boxes and radio buttons (checked) and the selected options (selected). Blazor sets these properties, not the attributes, so they are not in the DOM otherwise. The default is true.
IndentGets whether the HTML is indented, one element per line. The default is true.
RemoveElementReferenceAttributesGets whether the _bl_* attributes, which identify the elements of the element references, are removed. The default is true.
RemoveScopedCssAttributesGets whether the b-* attributes of the CSS isolation are removed. The default is false.

Gets the default options.

public static MarkupOptions Default { get; }

Property value

MarkupOptions

IncludeFormState

MarkupOptions.cs

Gets whether the state of the form fields is written as attributes: the value of the text fields (value), the state of the check boxes and radio buttons (checked) and the selected options (selected). Blazor sets these properties, not the attributes, so they are not in the DOM otherwise. The default is true.

public bool IncludeFormState { get; init; }

Property value

bool

Gets whether the HTML is indented, one element per line. The default is true.

public bool Indent { get; init; }

Property value

bool

RemoveElementReferenceAttributes

MarkupOptions.cs

Gets whether the _bl_* attributes, which identify the elements of the element references, are removed. The default is true.

public bool RemoveElementReferenceAttributes { get; init; }

Property value

bool

RemoveScopedCssAttributes

MarkupOptions.cs

Gets whether the b-* attributes of the CSS isolation are removed. The default is false.

public bool RemoveScopedCssAttributes { get; init; }

Property value

bool