xamarin onplatform code example
Example: TypeArguments for padding
<StackLayout Grid.Row="1" Orientation="Vertical" HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<StackLayout.Padding>
<OnIdiom x:TypeArguments="Thickness">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="Thickness"
iOS="10,0,0,0"
Android="10,0,0,0"
WinPhone="8,0,0,0" />
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="Thickness"
iOS="20,0,0,0"
Android="20,0,0,0"
WinPhone="18,0,0,0" />
</OnIdiom.Tablet>
</OnIdiom>
</StackLayout.Padding>