There is a project on Xamarin.Forms. On some pages there are elements where the text is centered horizontally and vertically (for example, the buttons are Label , with Horizonta/VerticallTextAlignment = Center ). But the unexpected happens: the text slides up or to the left. For example, the button below:

Normal button

Click, go to another page, go back and see this:

Bugged button

Or alphabetical list of cities:

Bugged alphabet

Here it turns out this, if you scroll the page to the end down, then go back up and start scrolling again.

What could be the problem?

Button code, for example, looks like this:

 <RelativeLayout Grid.Row="1" Margin="0" Padding="0"> <Label RelativeLayout.XConstraint = "0" RelativeLayout.WidthConstraint="{ConstraintExpression Property=Width, Factor=1, Constant=0, Type=RelativeToParent}" RelativeLayout.YConstraint="{ConstraintExpression Property=Height, Factor=0, Constant=-24, Type=RelativeToParent}" BackgroundColor="{Binding btnSendBgColor, Mode=OneWay}" Text="ПОСЧИТАТЬ" Style="{StaticResource ButtonPushDown}" > <Label.GestureRecognizers> <TapGestureRecognizer Command="{Binding Calculate}" /> </Label.GestureRecognizers> </Label> </RelativeLayout> 

Style:

 <Style x:Key="ButtonPushDown" TargetType="Label"> <Setter Property="TextColor" Value="#ffffff" /> <Setter Property="FontSize" Value="16" /> <Setter Property="HeightRequest" Value="50" /> <Setter Property="VerticalTextAlignment" Value="Center" /> <Setter Property="HorizontalTextAlignment" Value="Center" /> <Setter Property="Margin" Value="0" /> <Setter Property="FontFamily" Value="{StaticResource BaseFont}" /> </Style> 

    0