| Name |
Type |
Default value |
Description |
|---|
| OnAddModal |
event Func<BitPanelReference, Task>? |
|
Raised for every panel shown through this service, whoever showed it. |
| OnCloseModal |
event Func<BitPanelReference, Task>? |
|
Raised once for every panel of this service that closes, however it closed. |
| IsContainerAvailable |
bool |
|
Whether a BitPanelContainer is currently mounted for this service, i.e. whether a Show call right now would render its panel. |
| OpenModals |
IReadOnlyList<BitPanelReference> |
|
A snapshot of the panels this service currently has open, in the order they were opened. |
| GetModal |
BitPanelReference? (string? id) |
|
The open panel with the given id, or null when there is none. |
| Close |
Task (BitPanelReference panel, object? result = null) |
|
Closes an open panel with the result its Result task completes with. This is the application closing the panel, so the CanClose guard is not asked. |
| TryClose |
Task<bool> (BitPanelReference panel, object? result) |
|
Asks a panel to close and reports whether it did: a panel whose CanClose guard turns the close down stays open and this answers false. |
| CloseAll |
Task |
|
Closes every panel this service currently has open, each with a null result, the last one opened first. The CanClose guards are not asked. |
| Refresh |
Task (BitPanelReference? panel) |
|
Re-renders the open panels, after their parameters were changed in place. Without an argument it refreshes every open panel. |
| Show<T> |
Task<BitPanelReference> (Dictionary<string, object>? parameters, BitPanelParameters? panelParameters, bool persistent) |
|
Shows a panel with the component T as its content, given the parameters. A persistent panel outlives the page it was opened from and a remount of its container. Overloads take the parameters as a BitModalContentParameters<T>, a factory handed the panel's reference, or no parameters at all. |
| Show |
Task<BitPanelReference> (Type componentType, ...) |
|
The same, with the type of the content known at run time. |
| Show |
Task<BitPanelReference> (RenderFragment content, BitPanelParameters? panelParameters, bool persistent) |
|
Shows a panel with markup as its content. An overload takes a RenderFragment<BitPanelReference>, handed the panel's own reference. |
| Name |
Type |
Default value |
Description |
|---|
| AriaLabel |
string? |
null |
Gets or sets the accessible label for the component, used by assistive technologies. |
| Class |
string? |
null |
Gets or sets the CSS class name(s) to apply to the rendered element. |
| Dir |
BitDir? |
null |
Gets or sets the text directionality for the component's content. |
| Disabled |
bool |
false |
Gets or sets a value indicating whether the component is disabled and cannot respond to user interaction. |
| ForceAnimation |
bool |
false |
Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. |
| HtmlAttributes |
Dictionary<string, object> |
new Dictionary<string, object>() |
Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. An attribute written on the component wins over an entry of the same name. |
| Id |
string? |
null |
Gets or sets the unique identifier for the component's root element. |
| Style |
string? |
null |
Gets or sets the CSS style string to apply to the rendered element. |
| TabIndex |
string? |
null |
Gets or sets the tab order index for the component when navigating with the keyboard. |
| Visibility |
BitVisibility |
BitVisibility.Visible |
Gets or sets the visibility state (visible, hidden, or collapsed) of the component. |
BitPanelParameters properties
The options a panel is shown with. Every parameter of BitPanel a panel shown from code can be given - including Class, Style, Dir, AriaLabel and Disabled, and its placement, size and snap points - has a nullable counterpart here (null means "not set": the container's value, then the panel's own default is used), plus the options only a service can offer:
| Name |
Type |
Default value |
Description |
|---|
| SnapPoint |
int? |
null |
The snap point a bottom sheet opens at. The sheet keeps the one the user moves it to from there on. |
| CanClose |
Func<Task<bool>>? |
null |
The guard every dismissal by the user and every TryClose is put to: answering false keeps the panel open. Close is never put to it. |
| CloseOnNavigation |
bool? |
null |
Whether the panel closes when the app navigates somewhere else, which it does by default (a persistent panel only closes when this is set to true). Only a change of path counts; a query string or a fragment changed on the same page does not. |