title: XAML - Restrict Width of one TextBlock in flexible Grid, while not restricting other Grid childern?
body: <p>I have a feeling there is a simple solution but I'm just stuck.</p>
  
  <p>In XAML I have a Grid with auto size, with several Rows, with TextBlock in each Row.<br>
  I need one of the TextBlocks to restrict it's Width so it doesn't stretch the Grid, while let the other ones to stretch and define Width of the Grid (= of the whole Control).<br>
  Or in other words so one TextBlock Width (MaxWidth) is set to Width of widest of the remaining TextBlocks.<br>
  Of course the restricted TextBlock has a text Wrap, the other ones don't.</p>
  
  <p>When I just set the restricted TextBlock HorizontalAlignment="Left" (or anything else then Stretch) and TextWrapping="Wrap" the tblock still takes all space it can.</p>
  
  <p>I can't simply bind the tblock's Width to some other element Width, because I need largest of several Widths.</p>
  
  <p>The only solution I was able to think of..<br>
  I can derive from TextBlock, override OnArrange, somehow get sizes of its neighbor tblocks and set its size accordingly.<br>
  Or I can create a Converter and do basically similar as above with multi biding.</p>
  
  <p>Thought it seems like I'm killing a mosquito with bulldozer and theres some simple solution I missed (?)</p>
  
  <p>Edit: sample code  </p>
  
  <pre><code>&lt;Grid x:Name="rootGrid" HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="64" MinHeight="64" &gt;
  
      &lt;Rectangle x:Name="bgRect" Fill="Gray" RadiusX="6" RadiusY="6" Margin="1" Grid.RowSpan="2" /&gt;
  
      &lt;Grid x:Name="contentGrid" Grid.Row="1" Margin="8,0,8,6" &gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="auto" /&gt;
              &lt;RowDefinition Height="auto" /&gt;
              &lt;RowDefinition Height="auto" /&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;TextBlock x:Name="textName" Text="Gill Bates junior" FontWeight="Bold" FontSize="14" /&gt;
  
          &lt;TextBlock x:Name="textDesc" TextWrapping="Wrap" Grid.Row="1" HorizontalAlignment="Left" 
                      Text="Test test test test Test test test test Test test test test Test test test test Test test test test Test test test test Test test test test " /&gt;
          &lt;TextBlock x:Name="textDates" Text="1995 - 2075" Grid.Row="2" /&gt;
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>