xaml is not accepting OnIdiom when used with the new syntax of RowDefinitions and ColumnDefinitions https://github.com/microsoft/microsoft-ui-xaml/issues/673:
RowDefinitions="{OnIdiom Tablet="*,*,auto", Phone="*,*,*"}" highlight:
expected '>' AND expected '}'
Tried the following workaround but crashing the app on Xamarin and throwing the exception:
System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'
<Grid.RowDefinitions>
<RowDefinitionCollection>
<OnIdiom x:TypeArguments="RowDefinitionCollection">
<OnIdiom.Phone>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</OnIdiom.Tablet>
</OnIdiom>
</RowDefinitionCollection>
</Grid.RowDefinitions>
To be accepted as a valid syntax.
Invalid syntax.
Visual studio 2019 16.8.1
Your XAML syntax is invalid because of your nested double quotes, it should be
RowDefinitions="{OnIdiom Tablet='*,*,auto', Phone='*,*,*'}"
That said, it's not working; at runtime, it does give an error:
SetValue: Can not convert *,*,* to type 'Xamarin.Forms.RowDefinitionCollection
Most helpful comment
Your XAML syntax is invalid because of your nested double quotes, it should be
RowDefinitions="{OnIdiom Tablet='*,*,auto', Phone='*,*,*'}"That said, it's not working; at runtime, it does give an error:
SetValue: Can not convert *,*,* to type 'Xamarin.Forms.RowDefinitionCollection_12965 Repro.zip