title: MVVM - listview itemsSource binding different than binding of listview's elements
body: <p>I have more of a question than problem.
  I have my listView in XAML:</p>
  
  <pre><code>&lt;ListView Margin="25,10,25,10" Name="BookListView" ItemsSource="{Binding Books}" DockPanel.Dock="Top"&gt;
      &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Grid&gt;
                  &lt;TextBlock Text="{Binding Name}"/&gt;
                  &lt;StackPanel&gt;
                      &lt;TextBlock Text="Number: " /&gt;
                      &lt;TextBlock Text="{Binding Number}" /&gt;
                  &lt;/StackPanel&gt;
  
                  &lt;Button Content="Read" Visibility="Hidden" Name="ReadButton" Command="{Binding ReadCommand}"/&gt;
              &lt;/Grid&gt;
              &lt;DataTemplate.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=TemplatedParent}}" Value="True"&gt;
                      &lt;Setter TargetName="ReadButton" Property="Visibility" Value="Visible"/&gt;
                  &lt;/DataTrigger&gt;
              &lt;/DataTemplate.Triggers&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>And for formality my DataContext:</p>
  
  <pre><code>public MainWindow()
  {
      InitializeComponent();
      DataContext = new BookListViewModel();
  }
  </code></pre>
  
  <p>My listView itemsSource is binded to observableCollection of elements of my class called "Book" in my viewModel and everything works great (in this code snippet I deleted all code which specify looks of this window).<br/>
  My problem is that each element in my list contains a button which shows up, when element is clicked. If I bind my command as I did in this code, application will expect my ReadCommand to be in Book class code, which as I always thought violate the MVVM Pattern. 
  So my question is - is this solution acceptable in MVVM pattern? If no, then how can I go back from binding to observableList in listView to binding the viewModel in my button?</p>