title: WPF MVVM: how to bind GridViewColumn to ViewModel-Collection?
body: <p>In my View I got a ListView bound to a CollectionView in my ViewModel, for example like this:</p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding MyCollection}" IsSynchronizedWithCurrentItem="true"&gt;
    &lt;ListView.View&gt;
      &lt;GridView&gt;
        &lt;GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=Title}"/&gt;
        &lt;GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}"/&gt;
        &lt;GridViewColumn Header="Phone" DisplayMemberBinding="{Binding Path=Phone}"/&gt;
        &lt;GridViewColumn Header="E-mail" DisplayMemberBinding="{Binding Path=EMail}"/&gt;
      &lt;/GridView&gt;
    &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>Right now these GridViewColumns are fixed, but I'd like to be able to change them from the ViewModel. I'd guess I'll have to bind the GridViewColumn-collection to something in the ViewModel, but what, and how?<br>
  The ViewModel does know nothing of WPF, so I got no clue how to achieve this in MVVM.</p>
  
  <p>any help here?</p>