For UWP, I need a different size for the column width in the Grid . In addition, the value should be different on the tablet and smartphone.
The following application failure code
<ColumnDefinition> <ColumnDefinition.Width> <OnIdiom.Phone> <OnPlatform x:TypeArguments="GridLength" iOS="*" Android="*" WinPhone="100" /> </OnIdiom.Phone> <OnIdiom.Tablet> <OnPlatform x:TypeArguments="GridLength" iOS="*" Android="*" WinPhone="200" /> </OnIdiom.Tablet> </ColumnDefinition.Width> </ColumnDefinition>
with
OnIdiom.Phone type not found in xmlns http://xamarin.com/schemas/2014/forms
The code is in ViewCell . Therefore, I cannot use an additional ResourceDictionary , and OnSizeAllocated() not available in a file that is outside the code.
Can I use OnIdiom and OnPlatform together?
source share