xamarin/Xamarin.Forms

RTL doesn't switch the margin

Aperta

#3066 aperta il 18 giu 2018

 (5 commenti) (2 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/rtle/2 :clock2:help wantedin-progresst/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

switch from LTR to RTL doesn't mirror the margin

Steps to Reproduce

  1. add the below XAML to a content page and check the result `

     <Label Text="LeftToRight"
            Margin="10" />
     <Grid FlowDirection="LeftToRight">
         <BoxView Margin="50,0,0,0"
                  WidthRequest="100"
                  HeightRequest="100"
                  Color="Red"
                  HorizontalOptions="Start"
                  VerticalOptions="Start"
                  FlowDirection="LeftToRight" />
     </Grid>
     <Label Text="RightToLeft"
            Margin="10" />
     <Grid FlowDirection="RightToLeft">
         <BoxView Margin="50,0,0,0"
                  WidthRequest="100"
                  HeightRequest="100"
                  Color="Red"
                  HorizontalOptions="Start"
                  VerticalOptions="Start"
                  FlowDirection="RightToLeft" />
     </Grid>
    

    `

Expected Behavior

switching from LTR to RTL Should mirror the margin

Actual Behavior

switching from LTR to RTL doesn't mirror the margin

Basic Information

  • Platform Target Frameworks:

    • iOS:
    • Android:
    • UWP:
  • Nuget Packages: xamarin forms 3

Screenshots

current state screenshot_1529295623

desired state screenshot_1529295404

Reproduction Link

RTLMarginIssue.zip

Guida contributor