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
parametersobjectoptionsDialogOptions
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
parametersobjectoptionsDialogOptions
Returns
- Task<TResult>
Type Parameters
TComponentTResult
ShowDrawerAsync<TComponent>(object?, DrawerOptions?)
Opens a drawer without awaiting a result.
Task ShowDrawerAsync<TComponent>(object? parameters = null, DrawerOptions? options = null) where TComponent : IModalContent
Parameters
parametersobjectoptionsDrawerOptions
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
parametersobjectoptionsDrawerOptions
Returns
- Task<TResult>
Type Parameters
TComponentTResult
Events
OnChangeAsync
Raised whenever the active-modals list changes; awaited sequentially.
event Func<Task>? OnChangeAsync
Event Type
- Func<Task>