--- /dev/null
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Github, 2818, "Right-to-Left MasterDetail in Xamarin.Forms Hamburger icon issue", PlatformAffected.Android)]
+ public class Issue2818 : MasterDetailPage
+ {
+ public Issue2818()
+ {
+ FlowDirection = FlowDirection.RightToLeft;
+
+ Master = new ContentPage
+ {
+ Title = "Master",
+ BackgroundColor = Color.SkyBlue,
+ Icon = "menuIcon"
+ };
+
+ 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 going to right side."
+ },
+ new Button
+ {
+ Text = "Set RightToLeft",
+ Command = new Command(() => FlowDirection = FlowDirection.RightToLeft)
+ },
+ new Button
+ {
+ Text = "Set LeftToRight",
+ Command = new Command(() => FlowDirection = FlowDirection.LeftToRight)
+ }
+ }
+ }
+ });
+ }
+ }
+}
<Compile Include="$(MSBuildThisFileDirectory)Issue3525.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue3275.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue3884.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2818.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue2831.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue4040.xaml.cs">
<DependentUpon>Issue4040.xaml</DependentUpon>
}
}
+ public void UpdateFlowDirection() => _pageContainer?.UpdateFlowDirection(_parent);
+
protected override void AddChildView(VisualElement childView)
{
_pageContainer = null;
fc?.SetOnCreateCallback(pc =>
{
_pageContainer = pc;
+ UpdateFlowDirection();
SetDefaultBackgroundColor(pc.Child);
});