title: C# WPF DataGrid bind IEnumerable<someclass>
body: <p>I want to do some DataGrid in WPF MVVM. I'm new to this. </p>
  
  <p>Why my simple solution is not working?</p>
  
  <p>I want to Bind this:</p>
  
  <pre><code>public IEnumerable&lt;ZenonClasses.RGMRecipeValue&gt; Values
          {
              get =&gt; SelectedPhase?.ValueItems;
          }
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>        &lt;DataGrid ItemsSource="{Binding Values.VarName}" HorizontalAlignment="Left" Height="171" Margin="10,0,0,0" Grid.Row="4" Grid.RowSpan="5" VerticalAlignment="Top" Width="380" Grid.ColumnSpan="2"/&gt;
  </code></pre>
  
  <p>But my DataGrid is empty.
  I guess I need some configuration and I'm looking for simple solution, unfortunately didn't find anything that would enough good explained for me.</p>