title: How to set IsReadOnly / IsEnabled on entire container like Panel or GroupBox using XAML?
body: <p>I have a <code>MVVM</code> application that contains multiple views with some complex <code>IsReadOnly</code> rules based on user permissions, view/edit mode and object state. </p>
  
  <p>I would like to set <code>IsReadOnly</code> and/or <code>IsEnabled</code> properties for entire groups of controls in the same container (<code>GroupBox</code> / <code>StackPanel</code> / <code>Grid</code> / <code>UserControl</code> / etc.). The value of this property will be defined in ViewModel. </p>
  
  <p>I've got 3-6 different <code>SomeGroupIsReadOnly</code> properties per UserControl (with a large number of input controls like <code>TextBox</code>, <code>RadioButtons</code>, <code>ComboBoxes</code> and some <code>DataGrids</code>) and I'm looking for a generic, <code>MVVM</code>-friendly solution, that will allow me to reuse Bindings on per-container basis, instead of specifying them for each individual control separately.</p>
  
  <p><strong>How can I set IsReadOnly / IsEnabled  on all controls inside container like Panel or GroupBox using XAML?</strong> </p>
  
  <p>It doesn't seem that WPF supports this out of the box...</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>I forgot to mention that setting IsEnabled for a container disables an important feature of TextBoxes - being able to copy their contents. I need them to be in <code>IsReadOnly=true</code> state. If there was a workarond for that, then my problem would be solved.</p>