Unified iOS FlyoutViewHandler
Unified iOS FlyoutViewHandler
Target: .NET 10
Goal
Implement FlyoutViewHandler for iOS, replacing the legacy PhoneFlyoutPageRenderer. Learn from both the existing renderer implementation and Shell's flyout handling to build a unified handler that both FlyoutPage and Shell can use.
Background
- WinUI already has a shared flyout handling approach
- iOS currently uses
PhoneFlyoutPageRenderer(inMicrosoft.Maui.Controls.Handlers.Compatibility) - There's also
TabletFlyoutPageRendererfor iPad split view scenarios - Shell has its own flyout implementation that duplicates much of the same logic
Rollout Strategy
-
Implement
FlyoutViewHandlerfor .NET 10 -
Gate behind AppContext switch - Wire FlyoutPage to use the new handler when the switch is enabled
-
Switch disabled by default initially - Allows testing and validation without affecting existing apps
-
Enable for FlyoutPage and Shell - Once validated, flip the switch to make it the default path
Guidelines
-
Implement
FlyoutViewHandlerfor iOS - Handle both phone and tablet scenarios -
Learn from
PhoneFlyoutPageRenderer- Extract patterns for flyout presentation, gestures, FlyoutLayoutBehavior handling -
Learn from Shell flyout handling - Incorporate patterns that work well for Shell's flyout
-
FlyoutPage and Shell both use it - Same handler, different consumers
-
Keep handler internal initially - Flexibility to iterate without public API commitment
-
Align with WinUI patterns - Use WinUI's unified approach as the reference model
-
Handle FlyoutLayoutBehavior modes - Default, Popover, Split, SplitOnLandscape, SplitOnPortrait
Success Criteria
-
FlyoutViewHandlerworks on iOS (phone and tablet) - FlyoutPage uses the new handler (when switch enabled)
- Shell can use the same handler for flyout (when switch enabled)
- All existing FlyoutPage tests pass with switch enabled
- All existing Shell flyout tests pass with switch enabled