Overlay

Overlays are used to temporarily overlay screen content to focus a dialog, progress or other information/interaction.

Examples

Default

Overlay with a default background (= NeutralBaseColor (#808080)) and default opacity (0.4).
Example
FlexStartCenterFlexEndSpaceBetweenSpaceAroundSpaceEvenly StartCenterEndStretchBaseline

Show Overlay
Download: 

Timed

A timed overlay that hides after being shown for 3 seconds
Example
FlexStartCenterFlexEndSpaceBetweenSpaceAroundSpaceEvenly StartCenterEndStretchBaseline

Show Overlay
Download: 

Transparent overlay

Overlay with a transparent background
Example
Show Overlay
Download: 

Background color

Overlay with a custom background color
Example
Show Overlay
Download: 

Full screen

Overlay which takes up the whole screen.
Example
Show Overlay
Download: 

Interactive

By using the Interactive and InteractiveExceptId properties, only the targeted element will not close the FluentOverlay panel. The user can click anywhere else to close the FluentOverlay.
In this example, the FluentOverlay will only close when the user clicks outside the white zone and the user can increment the counter before to close the Overlay.
Example
Interactive Exception Zone (my-zone) Full screen
Show Overlay
Increment

Counter: 0

Download: 

Documentation

FluentOverlay Class

Parameters

Name
Type
Default
Description
AlignmentAlign
Center
Gets or sets the alignment of the content to a Align value.
Defaults to Align.Center.
BackgroundColorstring?
Gets or sets the background color.
Needs to be formatted as an HTML hex color string (#rrggbb or #rgb)
Default NeutralBaseColor token value (#808080).
ChildContentRenderFragment?
Dismissablebool
True
Gets of sets a value indicating if the overlay can be dismissed by clicking on it.
Default is true.
FullScreenbool
False
Gets or sets a value indicating whether the overlay is shown full screen or bound to the containing element.
Interactivebool
False
Gets or sets a value indicating whether the overlay is interactive, except for the element with the specified FluentOverlay.InteractiveExceptId.
In other words, the elements below the overlay remain usable (mouse-over, click) and the overlay will closed when clicked.
InteractiveExceptIdstring?
Gets or sets the HTML identifier of the element that is not interactive when the overlay is shown.
This property is ignored if FluentOverlay.Interactive is false.
JustificationJustifyContent
Center
Gets or sets the justification of the content to a JustifyContent value.
Defaults to JustifyContent.Center.
Opacitydouble?
Gets or sets the opacity of the overlay.
Default is 0.4.
PreventScrollbool
False
Transparentbool
True
Gets or set if the overlay is transparent.
Visiblebool
False
Gets or sets a value indicating whether the overlay is visible.

EventCallbacks

Name
Type
Description
OnCloseEventCallback<MouseEventArgs>
Callback for when the overlay is closed.
VisibleChangedEventCallback<bool>
Callback for when overlay visibility changes.

Methods

Name
Parameters
Type
Description
DisposeAsyncValueTask
Disposes the overlay.
OnCloseHandlerAsyncMouseEventArgs e
Task
OnCloseInteractiveAsyncMouseEventArgs e
Task
Start
Center
End
Stretch
Baseline
FlexStart
Center
FlexEnd
SpaceBetween
SpaceAround
SpaceEvenly
An error has occurred. This application may no longer respond until reloaded. Reload 🗙