title: Bind TextBox Width from ColumnDefinition Width XAML WPF
body: <p>In my WPF project i want to bind TextBox Width property from ColumnDefinition Width.
  Now, it's not working !</p>
  
  <p>I used a converter (GridLengthConverter) to convert data to width.</p>
  
  <p>This is my code :</p>
  
  <pre><code>&lt;TextBox Grid.Column="1" Grid.Row="1" Style="{StaticResource SearchWhite}"  Name="tbSearch"
  Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type mic:DataGrid}},
  Path=ShowSearchBoxes, Converter={StaticResource visibleConverter}}" Width="{Binding
  RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ColumnDefinition}},
  Path=Width, Converter={StaticResource gridLengthConverter}, Mode=TwoWay}"/&gt;
  </code></pre>
  
  <p>gridLengthConverter is GridLengthConverter from assembly : PresentationFramework.</p>
  
  <p>I get an error "Unable to convert data attribut 'Converter'..." (translation from french).</p>
  
  <p>Someone can helps ?</p>