1

After I updated to Xamarin.Forms 5.0 this line of code has been broken:

<AbsoluteLayout.LayoutBounds>
    <OnPlatform x:TypeArguments="Rectangle">
        <On Platform="Android">0.5,0.49,0.4,0.5</On>
        <On Platform="iOS">0.5,0.52,0.4,0.5</On>
     </OnPlatform>
</AbsoluteLayout.LayoutBounds>

What can I do to fix it?

1 Answers1

1

About setting AbsoluteLayout.LayoutBounds by platform, you can try to following code:

<AbsoluteLayout Margin="20">
    <BoxView AbsoluteLayout.LayoutBounds="{OnPlatform Android='0,10,200,5', iOS='0,0,.5,.5'}" Color="Silver">          
    </BoxView>
   
</AbsoluteLayout>
Cherry Bu - MSFT
  • 10,160
  • 1
  • 10
  • 16