Skip to content
Introducing AI Conversations: Natural Language Interaction for Your Apps! Learn More

Overlay & LoadingOverlay

A full-screen overlay control with backdrop dimming, optional frosted glass blur, and fade animation. On MAUI, integrates with OverlayHost/ShinyContentPage (the same backdrop system used by FloatingPanel). The base Overlay supports any custom content via DataTemplate (MAUI) or RenderFragment (Blazor). The LoadingOverlay subclass provides a built-in loading template with either an indeterminate spinner or a determinate progress bar.

  • NuGet downloads for Shiny.Maui.Controls
  • NuGet downloads for Shiny.Blazor.Controls
Frameworks
.NET MAUI
Blazor
Custom OverlayLoading SpinnerLoading Progress
  • Integrates with OverlayHost/ShinyContentPage on MAUI (shared backdrop with FloatingPanel)
  • Optional frosted glass blur effect behind the backdrop
  • Smooth fade in/out animation
  • Custom content support via DataTemplate (MAUI) or RenderFragment (Blazor)
  • Built-in LoadingOverlay with spinner or progress bar
  • Two-way bindable IsShown property
  • Backdrop tap to dismiss
  • Optional message text

Overlays must be placed inside ShinyContentPage.Panels (or an OverlayHost). The page must use ShinyContentPage as its base class.

<shiny:ShinyContentPage xmlns:shiny="http://shiny.net/maui/controls" ...>
<!-- Page content (set via ContentProperty) -->
<ScrollView>
<VerticalStackLayout Padding="16">
<Button Text="Show Overlay" Command="{Binding ShowOverlayCommand}" />
</VerticalStackLayout>
</ScrollView>
<!-- Overlays in the Panels collection -->
<shiny:ShinyContentPage.Panels>
<shiny:Overlay IsShown="{Binding IsOverlayVisible}"
BlurRadius="10">
<shiny:Overlay.OverlayContentTemplate>
<DataTemplate>
<VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center" Spacing="12">
<Label Text="Hello from the overlay!" TextColor="White" FontSize="20" />
<Button Text="Dismiss" Command="{Binding DismissCommand}" />
</VerticalStackLayout>
</DataTemplate>
</shiny:Overlay.OverlayContentTemplate>
</shiny:Overlay>
</shiny:ShinyContentPage.Panels>
</shiny:ShinyContentPage>
<shiny:ShinyContentPage.Panels>
<shiny:LoadingOverlay IsShown="{Binding IsBusy}"
Message="Loading, please wait..." />
</shiny:ShinyContentPage.Panels>
<shiny:ShinyContentPage.Panels>
<shiny:LoadingOverlay IsShown="{Binding IsBusy}"
IsIndeterminate="False"
Progress="{Binding DownloadProgress}"
Message="Downloading..." />
</shiny:ShinyContentPage.Panels>
<Overlay IsShown="@isShown" OverlayColor="rgba(0, 0, 0, 0.6)" BlurRadius="10">
<ChildContent>
<button @onclick="() => isShown = true">Show Overlay</button>
</ChildContent>
<OverlayContent>
<div style="color: white; text-align: center;">
<h2>Hello from the overlay!</h2>
<button @onclick="() => isShown = false">Dismiss</button>
</div>
</OverlayContent>
</Overlay>
<LoadingOverlay IsShown="@isBusy"
IsIndeterminate="false"
Progress="@progress"
BlurRadius="8"
Message="Downloading...">
<p>Page content that gets overlaid when loading</p>
</LoadingOverlay>
PropertyTypeDefaultDescription
IsShownboolfalseShow/hide the overlay (TwoWay)
AnimationDurationuint250Fade animation duration in ms
BlurRadiusdouble0When > 0, applies a frosted glass blur effect behind the backdrop using FrostedGlassView. Uses native platform blur (UIVisualEffectView on iOS, RenderEffect on Android 12+).
OverlayContentTemplateDataTemplatenullCustom overlay content

Backdrop color and opacity are controlled at the ShinyContentPage / OverlayHost level:

PropertyTypeDefaultDescription
BackdropColorColorBlackShared backdrop color
BackdropMaxOpacitydouble0.5Maximum backdrop opacity when shown
ParameterTypeDefaultDescription
IsShownboolfalseShow/hide overlay
IsShownChangedEventCallback<bool>Two-way binding callback
OverlayColorstring”rgba(0,0,0,0.5)“CSS color for backdrop
OverlayOpacitydouble1.0Additional opacity multiplier
BlurRadiusdouble0When > 0, applies CSS backdrop-filter: blur(Xpx) to the backdrop
ChildContentRenderFragmentNormal page content
OverlayContentRenderFragmentContent rendered in the overlay
CssClassstring?nullAdditional CSS class

Inherits all Overlay properties, plus:

PropertyTypeDefaultDescription
IsIndeterminatebooltruetrue = spinner, false = progress bar
Progressdouble0Progress 0–100 (TwoWay)
Messagestring?nullText below the loading indicator
SpinnerColorColorWhiteActivityIndicator color
ParameterTypeDefaultDescription
IsIndeterminatebooltrueSpinner (true) or progress bar (false)
Progressdouble0Progress 0–100
Messagestring?nullText below the loading indicator
SpinnerColorstring”#FFFFFF”CSS spinner border color
SpinnerSizedouble48Spinner diameter in px
ProgressBarColorstring”#FFFFFF”Progress bar fill color
ProgressTrackColorstring”rgba(255,255,255,0.2)“Progress bar track color
BlurRadiusdouble0When > 0, applies CSS backdrop-filter: blur(Xpx) to the backdrop

MAUI: Place Overlay or LoadingOverlay inside ShinyContentPage.Panels or an OverlayHost. They share the backdrop with FloatingPanel — only one backdrop is shown at a time, and it auto-hides when all clients dismiss. Tapping the backdrop dismisses the overlay.

Blazor: The Overlay component uses ChildContent for your normal page content and OverlayContent for what appears in the overlay. Uses fixed CSS positioning when shown. No ShinyContentPage equivalent needed.

Your page must inherit from ShinyContentPage:

using Shiny.Maui.Controls.FloatingPanel;
public partial class MyPage : ShinyContentPage
{
public MyPage()
{
InitializeComponent();
}
}