Wednesday, July 1, 2020

Simplified Grid Row & Column Definitions in Xamarin Forms

Now with release for Xamarin.Forms 4.7 column and row definitions have been simplified.
Here is a simplified syntax sample:
<Grid ColumnDefinitions="1*, 2*, Auto, *, 200"
    RowDefinitions="1*, Auto, 35, 24, 30">
</Grid>
old fashioned code is below:
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="1*" />
        <ColumnDefinition Width="2*" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="200" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="1*" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="35" />
        <RowDefinition Height= "24" />
        <RowDefinition Height="30" />
    </Grid.RowDefinitions>
</Grid>
Thanks to Xamarin team

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...