title: Xamarin.Forms: how to center a multine label in a Row?
body: <p>I try to vertically center a <a href="http://depblog.weblogs.us/2016/06/27/xamarin-forms-multi-line-label-custom-renderer-gotcha/" rel="nofollow noreferrer">multiline Label</a> that contains a text that can be displayed on 1 or 2 lines.</p>
  
  <p>For the moment, I'm not able to get the expected rendering...</p>
  
  <p>I can have the multiline label that automatically extends but it is top aligned and not centered:
  <a href="https://i.stack.imgur.com/8Vfbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Vfbb.png" alt="label is not centered"></a></p>
  
  <p>This is the attached XAML:</p>
  
  <pre><code>&lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="*" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="0" /&gt;
  &lt;/Grid.RowDefinitions&gt;
  
  &lt;local:MultiLineLabel
      Grid.Row="0"
      Grid.Column="1"
      BackgroundColor="Orange"
      Text="{ Binding encart_titre }"         
      VerticalTextAlignment="Center"
      LineBreakMode="TailTruncation"
      Lines="2"
      ...
  /&gt;
  </code></pre>
  
  <p>I can also center the label, but in this case it doesn't auto extends:
  <a href="https://i.stack.imgur.com/quYNC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/quYNC.png" alt="enter image description here"></a></p>
  
  <p>This is the attached XAML:</p>
  
  <pre><code>&lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="*" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition Height="0" /&gt;
  &lt;/Grid.RowDefinitions&gt;
  
  &lt;local:MultiLineLabel
      Grid.Row="0"
      Grid.Column="1"
      BackgroundColor="Orange"
      Text="{ Binding encart_titre }"         
      VerticalTextAlignment="Center"
      LineBreakMode="TailTruncation"
      Lines="2"
      VerticalOptions="FillAndExpand"
      ...
  /&gt;
  </code></pre>
  
  <p><strong><em>Would you have any explanation? I also tried to add StackLayound around the Label, but this didn't change anything...</em></strong></p>