Table of Contents

Interface IModalService

Namespace
BlazOrbit.Components.Layout.Services
Assembly
BlazOrbit.dll

Coordinates dialog and drawer modals — opening, closing, and stack ordering.

public interface IModalService

Properties

ActiveModals

Currently open modals, in stacking order (last is topmost).

IReadOnlyList<ModalState> ActiveModals { get; }

Property Value

IReadOnlyList<ModalState>

Methods

CloseAllAsync()

Closes every active modal in reverse order.

Task CloseAllAsync()

Returns

Task

CloseAsync()

Closes the topmost modal.

Task CloseAsync()

Returns

Task

ShowDialogAsync<TComponent>(object?, DialogOptions?)

Opens a dialog without awaiting a result.

Task ShowDialogAsync<TComponent>(object? parameters = null, DialogOptions? options = null) where TComponent : IModalContent

Parameters

parameters object
options DialogOptions

Returns

Task

Type Parameters

TComponent

ShowDialogAsync<TComponent, TResult>(object?, DialogOptions?)

Opens a dialog and awaits a typed result.

Task<TResult?> ShowDialogAsync<TComponent, TResult>(object? parameters = null, DialogOptions? options = null) where TComponent : IModalContent

Parameters

parameters object
options DialogOptions

Returns

Task<TResult>

Type Parameters

TComponent
TResult

ShowDrawerAsync<TComponent>(object?, DrawerOptions?)

Opens a drawer without awaiting a result.

Task ShowDrawerAsync<TComponent>(object? parameters = null, DrawerOptions? options = null) where TComponent : IModalContent

Parameters

parameters object
options DrawerOptions

Returns

Task

Type Parameters

TComponent

ShowDrawerAsync<TComponent, TResult>(object?, DrawerOptions?)

Opens a drawer and awaits a typed result.

Task<TResult?> ShowDrawerAsync<TComponent, TResult>(object? parameters = null, DrawerOptions? options = null) where TComponent : IModalContent

Parameters

parameters object
options DrawerOptions

Returns

Task<TResult>

Type Parameters

TComponent
TResult

Events

OnChangeAsync

Raised whenever the active-modals list changes; awaited sequentially.

event Func<Task>? OnChangeAsync

Event Type

Func<Task>