Skip to content

[iOS/Mac] FlyoutPage RTL FlowDirection is not working properly #34830

Description

Description

FlyoutPage FlowDirection is not working properly for initial and runtime changes

Issue-demo.mov

Steps to Reproduce

  1. Use the below code and deploy it on iOS/Mac
public partial class MainPage : FlyoutPage
{
	public MainPage()
	{
		Init();
	}

	private void Init()
	{
		FlowDirection = FlowDirection.RightToLeft;

		Flyout = new ContentPage
		{
			Title = "Flyout",
			BackgroundColor = Colors.SkyBlue,
			IconImageSource = "menu_icon",
			Content = new StackLayout
			{
				Children =
				{
					new Button
					{
						Text = "If you can see me the test has passed",
						AutomationId = "CloseRootView",
						Command = new Command(() => IsPresented = false)
					}
				},
				AutomationId = "RootLayout"
			},
			Padding = new Thickness(0, 42, 0, 0)
		};

		Detail = new NavigationPage(new ContentPage
		{
			Title = "Detail",
			Content = new StackLayout
			{
				Children =
				{
					new Label
					{
						Text = "The page must be with RightToLeft FlowDirection. Hamburger icon in main page must be on the right side. There should be visible text inside the Flyout View"
					},
					new Button
					{
						Text = "Set RightToLeft",
						Command = new Command(() => FlowDirection = FlowDirection.RightToLeft),
						AutomationId = "ShowRightToLeft"
					},
					new Button
					{
						Text = "Set LeftToRight",
						Command = new Command(() => FlowDirection = FlowDirection.LeftToRight),
						AutomationId = "ShowLeftToRight"
					},
					new Button
					{
						Text = "Open Flyout View",
						Command = new Command(() => IsPresented = true),
						AutomationId = "OpenRootView"
					},
					new Label
					{
						Text = DeviceInfo.Idiom.ToString(),
						AutomationId = "Idiom"
					}
				}
			}
		});
	}
}
  1. Check the Layout is not properly aligned

Link to public reproduction project repository

No response

Version with bug

10.0.50

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions