OnIdiom in Xaml for HorizontalOptions and VerticalOptions

This took a while to figure out as there seems to be no docs on how to do it. Finally managed to get horizontal or vertical options to differ depending on the device idiom e.g. phone or tablet.


   <StackLayout Orientation=”Horizontal” VerticalOptions=”FillAndExpand” Grid.ColumnSpan=”{Binding PropertyListGridSpan}” >
                                            <OnIdiom x:TypeArguments=”LayoutOptions”>


 Hope this helps someone out

Written by: agileadmin Posted on: 13th March 2017