title: WPF Hide DataGridColumn via a binding
body: <p>For some reason I can't hide WPF Toolkit's DataGridColumn. I am trying to do the following:</p>
  
  <pre><code>&lt;dg:DataGridTemplateColumn Header="Item Description" Visibility="{Binding IsReadOnly}"&gt;
  &lt;dg:DataGridTemplateColumn.CellTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;TextBox Text="{Binding Path=ItemDescription}" /&gt;
      &lt;/DataTemplate&gt;
  &lt;/dg:DataGridTemplateColumn.CellTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>This doesn't work, since it's looking for a IsReadOnly property on the ItemSource (not a property of the current class).
  If add this as a property of the ItemSource class that implements INoifyPropertyChanged, it still doesn't hide the column. Is there a way around this? I want the column to hid when a button click changes IsReadOnly property.</p>
  
  <p>Assume IsReadOnly returns a Visibility value and is a dependency property</p>
  
  <p>I am completely stuck, I would really appreciate the help! Thanks a lot!</p>