title: Binding IsReadOnly of a DataGridTextColumn to a DataGridTemplateColumn checkbox IsChecked
body: <p>Basically, I have a <code>DataGrid</code> with several columns, and I want to enable (changing the <code>IsReadOnly</code> property) a <code>DataGridTextColumn</code> based on a <code>CheckBox</code> <code>IsChecked</code>, located in another <code>DataGridTemplateColumn</code> of the same <code>DataGrid</code>.</p>
  
  <p>Here is (the important part of) the code:</p>
  
  <pre><code>&lt;DataGrid Name="lstTags" Grid.Row="0" ItemsSource="{Binding Path = LinesCollection}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" SelectionMode="Single" LostFocus="lstTags_LostFocus" SelectionChanged="lstTags_SelectionChanged"&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTemplateColumn x:Name="colAutoScale" Header="Auto Scale"&gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;CheckBox x:Name="ckbAutoScale" HorizontalAlignment="Center" IsChecked="{Binding AutoScale, UpdateSourceTrigger=PropertyChanged}"/&gt;
                   &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
          &lt;DataGridTextColumn Header="Scale" Binding="{Binding Path=Scale}" IsReadOnly="{Binding ElementName ckbAutoScale, Path=IsChecked}" Width="60" /&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>It is worth mentioning that I also want to invert the value of the IsChecked property, that is</p>
  
  <ul>
  <li><code>IsChecked = true</code> => <code>IsReadOnly = false</code>;</li>
  <li><code>IsChecked = false</code> => <code>IsReadOnly = true</code>.</li>
  </ul>
  
  <p>I would probably achieve this with a simple <code>Converter</code>, but I need that first part working tho.</p>
  
  <p>EDIT:</p>
  
  <p>Answering a good question, my goal is to <strong>disable the adjacent cell</strong> (same row), not the whole column.</p>