OnPlatform style xamrin code example
Example 1: OnPlatform style xamrin
<Style x:Key="buttonStyle" TargetType="Button">
<Setter Property="FontSize">
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android">40</On>
<On Platform="iOS">10</On>
</OnPlatform>
</Setter>
</Style>
Example 2: OnPlatform style xamrin
<OnPlatform x:Key="MyFontSize" x:TypeArguments="x:Double" iOS="14" Android="14" WinPhone="14" />