title: Show WPF Tooltip if needed
body: <p>I have a TextBlock inside a limited-size control. If the text is too long to fit into the control, I'd like to show a tooltip with full text. This is a classic behavior you surely know from many apps.</p>
  
  <p>I tried using a Converter to convert TextBlock width into Tooltip's Visibility.</p>
  
  <pre><code>&lt;GridViewColumn.CellTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;TextBlock Text="{Binding Text}"&gt;
              &lt;TextBlock.ToolTip&gt;
                  &lt;ToolTip 
                      DataContext="{TemplateBinding Content}" 
                      Visibility="{Binding Converter={StaticResource visConvert}}"&gt;
  
                          &lt;TextBlock Text="{Binding Text}"&gt;&lt;/TextBlock&gt;
                  &lt;/ToolTip&gt;
              &lt;/TextBlock.ToolTip&gt;
          &lt;/TextBlock&gt;
      &lt;/DataTemplate&gt;
  &lt;/GridViewColumn.CellTemplate&gt;
  </code></pre>
  
  <p>The problem is that in the Converter:</p>
  
  <pre><code>public object Convert(object value, ...
  </code></pre>
  
  <p>'value' is the DataBound item. I'd like the 'value' to be the TextBlock, to observe its Width, and compare it to the GridViewColumn.Width.</p>