Jay Kannan Jay Kannan - 1 year ago 596
C# Question

OnPlatform tags not working in Xamarin Forms

I'm using Xamarin Studio 6.1, recently upgraded it to work with a Xamarin Forms project. I can't seem to get the OnPlatform tags working. I'm trying something like this

<Grid Padding="12">
<OnPlatform />

The previewer immediately breaks and complains Invalid XAML: Type
OnPlatform not found in xmlns="http://xamarin.com/schemas/2014/forms"

I've never seen this error before and can't find any help online. Any ideas?

Answer Source

it might because of not specifiying TypeArgument. Try this:

        <OnPlatform x:TypeArguments="x:Double"
        iOS="15" Android="10"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download