Table of Contents

Class BOBDialog

Namespace
BlazOrbit.Components.Layout
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBDialog : BOBComponentBase, IHasElevation
Inheritance
object
ComponentBase
BOBDialog
Implements
Inherited Members

Constructors

BOBDialog()

public BOBDialog()

Properties

Closable

When true (default), a close button is shown in the header.

[Parameter]
public bool Closable { get; set; }

Property Value

bool

CloseOnEscape

When true (default), pressing Escape closes the dialog.

[Parameter]
public bool CloseOnEscape { get; set; }

Property Value

bool

CloseOnOverlayClick

When true (default), clicking the overlay closes the dialog.

[Parameter]
public bool CloseOnOverlayClick { get; set; }

Property Value

bool

Content

Content rendered inside the dialog body.

[Parameter]
public RenderFragment? Content { get; set; }

Property Value

RenderFragment

Elevation

Material Design elevation level (0–24) applied to the dialog surface. Sets a derived shadow and lifts the surface in dark mode via a tint overlay. null (default) keeps the component-default shadow defined in CSS.

[Parameter]
public int? Elevation { get; set; }

Property Value

int?

Content rendered inside the dialog footer, typically action buttons.

[Parameter]
public RenderFragment? Footer { get; set; }

Property Value

RenderFragment

FullScreen

When true, the dialog fills the entire viewport.

[Parameter]
public bool FullScreen { get; set; }

Property Value

bool

Header

Custom header content rendered above the dialog body.

[Parameter]
public RenderFragment? Header { get; set; }

Property Value

RenderFragment

MaxHeight

Maximum height of the dialog. Accepts any valid CSS length.

[Parameter]
public string? MaxHeight { get; set; }

Property Value

string

MaxWidth

Maximum width of the dialog. Accepts any valid CSS length.

[Parameter]
public string? MaxWidth { get; set; }

Property Value

string

MinHeight

Minimum height of the dialog. Accepts any valid CSS length.

[Parameter]
public string? MinHeight { get; set; }

Property Value

string

MinWidth

Minimum width of the dialog. Accepts any valid CSS length.

[Parameter]
public string? MinWidth { get; set; }

Property Value

string

Open

When true, the dialog is visible.

[Parameter]
public bool Open { get; set; }

Property Value

bool

OpenChanged

Raised when the dialog opens or closes.

[Parameter]
public EventCallback<bool> OpenChanged { get; set; }

Property Value

EventCallback<bool>

Title

Text displayed in the dialog header. Ignored when Header is provided.

[Parameter]
public string? Title { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DisposeAsync()

public override ValueTask DisposeAsync()

Returns

ValueTask

OnAfterRenderAsync(bool)

Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

Note that the component does not automatically re-render after the completion of any returned System.Threading.Tasks.Task, because that would cause an infinite render loop.

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Set to true if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwise false.

Returns

Task

A System.Threading.Tasks.Task representing any asynchronous operation.

Remarks

The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods are useful for performing interop, or interacting with values received from @ref. Use the firstRender parameter to ensure that initialization work is only performed once.