-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
On iOS, changing the FlyoutLayoutBehavior property does not change the state of the Flyout menu page. For example, changing the FlyoutLayoutBehavior from Split to Popover should cause the flyout to change to Popover mode, but nothing happens. This works on Android, although there are other problems when changing FlyoutLayoutBehavior, and I will create a separate issue for that.
The PhoneFlyoutPageRenderer.HandlePropertyChanged handler does not handle changes to FlyoutLayoutBehavior. This should be a two line change to that method:
if (e.PropertyName == Microsoft.Maui.Controls.FlyoutPage.FlyoutLayoutBehaviorProperty.PropertyName) LayoutChildren(true);
Steps to Reproduce
- Create an app with a Flyout page on tablet/deskop (phone does not support Split mode)
- Toggle the FlyoutLayoutBehavior property between Split and Popover
- Notice that the flyout behavior of the flyout menu does not change
Link to public reproduction project repository
https://github.com/mjo151/maui-flyout-behavior-bug
Version with bug
8.0.0-rc.1
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
All iOS versions
Did you find any workaround?
The only workaround is to create a custom PhoneFlyoutPageRenderer that inherits from PhoneFlyoutPageRenderer and call LayoutChildren when the FlyoutLayoutBehavior changes. However, LayoutChildren is internal. I can call LayoutChildren using reflection but that's not a viable solution for a production app.
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status