dotnet / dotnet/maui

Responsive FlyoutBehavior

Open
#7,161 10 comments 9 reactions 0 assignees View on GitHub
area-controls-shell platform/windows proposal/open
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

Currently there are 3 options available for the FlyoutBehavior setting: `Disabled`, `Flyout` and `Locked`
It'd be nice to have a responsive setting which reacts to the width of the screen, Similar to how the Windows 10 & 11 settings menu has been implemented.

Example:

https://user-images.githubusercontent.com/4095127/168296567-c8edc9ec-de8c-42e7-86c1-2290072499b0.mp4

In the past the Xamarin.Forms FlyoutPage featured the following options: `Default`, `Popover`, `Split`, `SplitOnLandscape`, `SplitOnPortrait`.
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/flyoutpage#control-the-detail-page-layout-behavior

However,
> **Important**
> The value of the [FlyoutLayoutBehavior](https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.flyoutpage.flyoutlayoutbehavior#xamarin-forms-flyoutpage-flyoutlayoutbehavior) property only affects applications running on tablets or the desktop. Applications running on phones always have the Popover behavior.

Additionally I don't believe the FlyoutLayoutBehavior was able to react to window sized changed events.

### Public API Changes

```

```

### Intended Use-Case

This feature would be useful in Windows & macOS applications as the content area can be resized.
Additionally this feature is common on tablet formfactors, specifically when transitioning from landscape to portrait orientation.

Contributor guide

Open the contributing guide

Research direction

The issue proposes a new Responsive value for Shell.FlyoutBehavior, adapting the flyout to window width on Windows, macOS, and tablets. Start by locating the FlyoutBehavior implementation and existing tests; done means the behavior responds to resizing and orientation changes across the stated form factors, with the proposed XAML API working.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop-dev, frontend, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.