title: WPF Statusbar, stretch textblock to take as much space as possible
body: <p>I created my own simple statusbarcontrol with 3 TextBlocks. Now I would like that the first Textblock takes as much space as it has available. That I don't seem to get done.. Now it only takes the space needed to display the text.</p>
  
  <p>XAML:</p>
  
  <pre><code>  &lt;StatusBar Background="{StaticResource GradientBrush}"&gt;
  &lt;StatusBar.ItemsPanel&gt;
    &lt;ItemsPanelTemplate&gt;
      &lt;Grid&gt;
        &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto" /&gt;
        &lt;/Grid.RowDefinitions&gt;
        &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="*" /&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
        &lt;/Grid.ColumnDefinitions&gt;
      &lt;/Grid&gt;
    &lt;/ItemsPanelTemplate&gt;
  &lt;/StatusBar.ItemsPanel&gt;
  &lt;StatusBarItem HorizontalAlignment="Left"
                 HorizontalContentAlignment="Right"&gt;
    &lt;Border BorderThickness="1"
            BorderBrush="Black"
            Padding="5 0 5 0"
            Background="White"&gt;
      &lt;TextBlock Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
               Foreground="{Binding TextColorMessage}"
               Background="White"
               /&gt;
    &lt;/Border&gt;
  &lt;/StatusBarItem&gt;
  &lt;Separator Grid.Column="1" /&gt;
  &lt;StatusBarItem Grid.Column="2"
                 HorizontalAlignment="Right"&gt;
    &lt;TextBlock Text="{Binding Path=DatabaseName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /&gt;
  &lt;/StatusBarItem&gt;
  &lt;Separator Grid.Column="3" /&gt;
  &lt;StatusBarItem Grid.Column="4"
                 HorizontalAlignment="Right"&gt;
    &lt;TextBlock Text="{Binding Path=ComputerName}" /&gt;
  &lt;/StatusBarItem&gt;
  </code></pre>
  
  <p></p>
  
  <p><img src="https://i.stack.imgur.com/m4MXw.jpg" alt="My StatusBar"></p>