title: How to toggle 2 listviews in dockpanel programmatically? [WPF]
body: <p>So here is the scenario, In my WPF application I have 2 list view in my dockpanel(Only one listview should visible at a time) each listview view contain different Contextmenu item. I would like to toggle my listview onclick button. How can I do it programmatically?</p>
  
  <pre><code> &lt;Grid&gt;
   &lt;Button Name="toggle" click= "toggle_click"&gt;&lt;/Button&gt;
   &lt;/Grid&gt;
  
  &lt;Dockpanel&gt; 
  &lt;Listview&gt;
  &lt;ListView.ContextMenu&gt;
  .View
  .Print
  .Send via mail
  
  &lt;/ListView.ContextMenu&gt;
  &lt;/Listview&gt;
  
  &lt;Listview&gt;
  &lt;ListView.ContextMenu&gt;
  .Add
  .Delete
  .Modify
  
  &lt;/ListView.ContextMenu&gt;
  &lt;/Listview&gt;
  &lt;/Dockpanel&gt; 
  </code></pre>
  
  <p>Please help as I am new to WPF programming I am struggling a lot to learn it.</p>