ThisQRequiresASpecialist
ThisQRequiresASpecialist

Reputation: 1104

Xamarin Forms Grid RowDefinitions support OnIdiom on the same line as Grid is defined?

There is a post on stack overflow which is very similar but doesn't actually ask about the new way of defining RowDefinitions. Similar Question

What is the correct format for Idiom using this row definition method...

<Grid BackgroundColor="LightGreen"
      Margin="0, 10 ,0 ,10"
      RowDefinitions="{OnIdiom ?????}, *, 100">
</Grid>

Is it possible to set Idiom using inline property definitions or do I actually have to create RowDefinitions as shown in Similar Question?

Thanks in advance.

Upvotes: 1

Views: 300

Answers (1)

FreakyAli
FreakyAli

Reputation: 16449

If you want Platform Specific or Idiom Specific Row definitions there's only one way to do it through XAML,

<Grid.RowDefinitions>
   <RowDefinition Height="{OnIdiom Phone=30, Tablet=60}" />
   <RowDefinition Height="{OnPlatform Android=40, iOS=35}" />
</Grid.RowDefinitions>

Hope this helps

Upvotes: 2

Related Questions