Skip to content
Shiny.NET
Shiny Client v7 on .NET 11Every Shiny client package now targets .NET 11 - MAUI 11, Blazor WebAssembly 11 and Uno 7 - plus BLE manufacturer data scan filters, screen-off iBeacon monitoring and iOS location permission fixes.Release notes

Shell & App-Wide Flyouts

Frameworks
.NET MAUI

ShinyFlyout is a pair of attached properties — StartTemplate and EndTemplate — that install a flyout over every page a host shows. Put them on a Shell, a NavigationPage, or a single page.

<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:shiny="http://shiny.net/maui/controls"
x:Class="MyApp.AppShell"
FlyoutBehavior="Disabled">
<shiny:ShinyFlyout.StartTemplate>
<DataTemplate>
<shiny:FlyoutPanel State="Hidden"
CollapsedState="Hidden"
Presentation="Overlay"
ExpandedWidth="280">
<shiny:FlyoutPanel.HeaderContent>
<Label Text="Menu" FontSize="18" FontAttributes="Bold" Padding="20,18" />
</shiny:FlyoutPanel.HeaderContent>
<VerticalStackLayout Padding="8">
<Label Text="Home" Padding="16,12" />
<Label Text="Projects" Padding="16,12" />
<Label Text="Settings" Padding="16,12" />
</VerticalStackLayout>
</shiny:FlyoutPanel>
</DataTemplate>
</shiny:ShinyFlyout.StartTemplate>
<!-- ShellContent … -->
</Shell>

Open it from anywhere with IFlyoutService:

public class ToolbarViewModel(IFlyoutService flyouts)
{
public Task OpenMenu() => flyouts.ToggleAsync();
}

Each page builds its own panel from the template. Sharing one panel instance across pages would mean re-parenting it on every navigation, which rebuilds its native views and throws away scroll position and focus.

What carries across pages is the state — a drawer left open is still open on the page you land on, and a rail stays a rail.

The options that live on the FlyoutView rather than on a panel are attached properties on the host as well. Each is copied onto the view installed on every page, and changing one later reaches the pages already showing:

Attached property Default
ShinyFlyout.PushMode Shift Resize narrows the content instead of sliding it aside — what a permanent sidebar wants
ShinyFlyout.ScrimColor theme
ShinyFlyout.ScrimOpacity 0.4
ShinyFlyout.IsAnimationEnabled true
<Shell xmlns:shiny="http://shiny.net/maui/controls"
FlyoutBehavior="Disabled"
shiny:ShinyFlyout.PushMode="Resize">
<shiny:ShinyFlyout.StartTemplate>…</shiny:ShinyFlyout.StartTemplate>
</Shell>

Per-panel options — IsSwipeEnabled, Presentation, ExpandedWidth and the rest — go on the FlyoutPanel in the template.

  • Set Shell.FlyoutBehavior="Disabled" so Shell’s own drawer stays out of the way.
  • The flyout wraps the page’s content, so a panel sits below the nav bar and above the tab bar, and Presentation="Push" pushes the page content rather than Shell’s chrome. Add Shell.NavBarIsVisible="False" to a page if the panel should run the full height of the window.
  • A page that is already a ShinyFlyoutPage is skipped — it brings its own.

The same two properties work on a NavigationPage, which is the closest thing to the old FlyoutPage + Detail = new NavigationPage(...) arrangement:

var nav = new NavigationPage(new HomePage());
ShinyFlyout.SetStartTemplate(nav, new DataTemplate(() => new FlyoutPanel
{
State = FlyoutPanelState.Hidden,
CollapsedState = FlyoutPanelState.Hidden,
Presentation = FlyoutPresentation.Overlay,
PanelContent = new NavigationMenu()
}));

Every page pushed onto that stack gets the drawer.

Setting the attached property directly on a ContentPage installs the flyout on just that page — useful when one screen needs a drawer and the rest of the app does not, without changing the page’s base class.

Because XAML applies properties in document order, a template declared above the page’s content is set while the page still has none; the install waits for the content to arrive rather than wrapping nothing.