Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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?
Hello,
Welcome to our Microsoft Q&A platform!
I used following way to set LayoutBounds
for Android and iOS, it is worked.
<BoxView Color="Blue"
AbsoluteLayout.LayoutBounds="{OnPlatform Android='0.5,0.49,0.4,0.5', iOS='0.5,0.52,0.4,0.5' }"
AbsoluteLayout.LayoutFlags="All" />
Here is running screenshot.
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.