Reputation: 50
I'm developing a new cross-platform application with Xamarin 4.0 and I want change layouts to right to left direction.
I want shell items and flyout menu in right of screen. I tried this code in Shell tag. But it didn't work.
FlowDirection = "RightToLeft"
What should I do?
Thanks.
Upvotes: 1
Views: 958
Reputation: 21
in main activity inside OnCreate method: Make it look like that
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
Window.DecorView.LayoutDirection = LayoutDirection.Rtl;
LoadApplication(new App());
}
Upvotes: 2
Reputation: 12723
Unfortunately, it should be the limit of Shell Flyout .
FlowDirection:Just can modify the direction of subview's content, not the parent layout of it.
After testing in official sample Xamarin.Forms - Xaminals , setting FlowDirection = "RightToLeft"
can not changing Flyout from left of screen to right of screen.
Note: If have other solutions to solve the direction of parent layout, will update here.
Upvotes: 2