Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Correct 'OnPlatform' syntax in XAML?

$
0
0

I'm trying to understand why this snippet is throwing a XAML parse error at runtime:

     <Style x:Key="MyButton" TargetType="Button">
                    <Setter Property="BackgroundColor" Value="Transparent"/>
                    <Setter Property="FontSize" Value="36" />
                    <Setter Property="BorderWidth">
                        <Setter.Value>
                            <OnPlatform x:TypeArguments="x:Double">
                                <OnPlatform.iOS Value="2" />
                                <OnPlatform.Android Value="0" />
                            </OnPlatform>
                        </Setter.Value>
                    </Setter>
                </Style>

What's wrong with this syntax, the exception doesn't give me any details.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>