title: WPF A good way to make a view/edit control?
body: <p>this is just a question to discuss - what is the best way to make a view/edit control in WPF? E.g. we have an entity object Person, that has some props (name, surname, address, phone etc.). One presentation of the control would be a read-only view. And the other would have the edit view for this same person. Example:</p>
  
  <pre><code>&lt;UserControl x:Name="MyPersonEditor"&gt;
      &lt;Grid&gt;
          &lt;Grid x:Name="ViewGrid" Visibility="Visible"&gt;
              &lt;TextBlock Text="Name:"/&gt;
              &lt;TextBlock Text="{Binding Person.Name}"/&gt;
              &lt;Button Content="Edit" Click="ButtonEditStart_Click"/&gt;
          &lt;/Grid&gt;
  
          &lt;Grid x:Name="EditGrid" Visibility="Collapsed"&gt;
              &lt;TextBlock Text="Name:"/&gt;
              &lt;TextBox Text="{Binding Person.Name}"/&gt;
              &lt;Button Content="Save" Click="ButtonEditEnd_Click"/&gt;
          &lt;/Grid&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>I hope that the idea is clear. The two options I see right now</p>
  
  <ol>
  <li>two grids with visibility switching and</li>
  <li>a TabControl without its header panel</li>
  </ol>
  
  <p>This is just a discussion question - not much trouble with it, yet I am just wondering if there are any other possibilities and elegant solutions to this.</p>