Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms On Platform The property 'Default' is set more than once

I am using Xamarin.Forms version 3.2.0.809874-pre3.

I am facing a problem that with this version I am getting the error "The property 'Default' is set more than once" when using OnPlatform at XAML.

Here is my code:

<ContentPage.Padding>
    <OnPlatform x:TypeArguments="Thickness">
        <On Platform="Android">10,5,10,0</On>
        <On Platform="iOS">10,20,10,0</On>
    </OnPlatform>
</ContentPage.Padding>
like image 657
AG70 Avatar asked Sep 14 '25 20:09

AG70


1 Answers

I'm was getting this too... Looks like this is just an intellisence bug. The apps compile fine.

You can build the solution F6 and the error goes away...but resurfaces when you edit the file.

like image 145
Chris Catignani Avatar answered Sep 17 '25 18:09

Chris Catignani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!