title: Setting multiple DataContexts in WPF C#
body: <p>How to set multiple dataContexts? I have Model and ViewModel - I can write just <strong>one</strong> data context in XAML in Windows.DataContext for example</p>
  
  <pre><code>&lt;Window.DataContext&gt;
      &lt;v:FacebookViewModel/&gt;
  &lt;/Window.DataContext&gt;
  </code></pre>
  
  <p>and then in constructor or on button click I can just write <code>_faceViewModel = (FacebookViewModel)this.DataContext;</code>. That will set dataContext.</p>
  
  <p>My question: I have 2 ViewModels and I want, on a click of a button or if you have some better idea, to change datacontext for my second ViewModel TwitterViewModel - how do to that? I'm learning WPF now and I'm really new at this...</p>