title: Xamarin Forms get absolute value from GridLength Star or Auto
body: <p>I want to use <code>Grid</code> layout type to define a small square in the lower corner of my phone screen.</p>
  
  <p>I'm trying to do it by getting a column width in the <code>OnAppearing</code> method in the code-behind, and using that to set a row height.</p>
  
  <p>In Xaml I've done this:</p>
  
  <pre><code>&lt;Grid x:Name         ="iconGrid"
        BackgroundColor="Green"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="9*" /&gt;
          &lt;ColumnDefinition Width="1.9*" /&gt;
          &lt;ColumnDefinition Width="0.1*" /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="5*" /&gt;
          &lt;RowDefinition Height="4.9*" /&gt;
          &lt;RowDefinition Height="0.1*" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Frame BackgroundColor="Purple"
             Grid.Row       ="1"
             Grid.Column    ="1" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>And then in OnAppearing I've done this:</p>
  
  <pre><code>    protected override async void OnAppearing()
      {
          base.OnAppearing();
  
          iconGrid.RowDefinitions[1].Height = new GridLength(iconGrid.ColumnDefinitions[1].Width.Value);
          iconGrid.RowDefinitions[2].Height = new GridLength(iconGrid.ColumnDefinitions[2].Width.Value);
          var remainingHeight = iconGrid.Height - iconGrid.RowDefinitions[2].Height.Value - iconGrid.RowDefinitions[2].Height.Value;
          iconGrid.RowDefinitions[0].Height = new GridLength(remainingHeight);
  
          Debug.WriteLine("rows: " + iconGrid.RowDefinitions[0].Height + ", " + iconGrid.RowDefinitions[1].Height + ", " + iconGrid.RowDefinitions[2].Height);
      }
  </code></pre>
  
  <p>My debug output is:</p>
  
  <pre><code>rows: 811.8.Absolute, 1.9.Absolute, 0.1.Absolute
  </code></pre>
  
  <p>So from the debug output it looks like I'm just getting the <em>star</em> values of the column widths and using them literally as <em>absolute</em> values for the rows, which of course doesn't work. </p>
  
  <p>What I want is to get the <em>on-screen absolute</em> values for the columns and use them as absolute values for the rows.</p>
  
  <p>So in short I need to get the actual on-screen point sise of columns that were defined as star-types. Is this possible? It seems like it must be.</p>