title: How to bind target to behind code object source property?
body: <p>How to bind explicit which property? i think it easy to understand binding. but really confusing. as i understand Path is attributbe to set which property to bind relative to DataContext attribute. by default DataContext is parent element &quot;MainWindow&quot; until custom DataContext set. because i dont set. Source is for explicit set specific part element to use different DataContext and the other element use parent DataContext. Path also can set explicit which object source and property to bind. ex. <code>MainWindow.Users</code>. whats wrong here?</p>
  <p>Front-End</p>
  <pre><code>&lt;ListView ItemsSource=&quot;{Binding Path=Users}&quot;&gt;
      &lt;ListView.View&gt;
          &lt;GridView&gt;
              &lt;GridViewColumn 
                  DisplayMemberBinding=&quot;{Binding Username}&quot;
                  Header=&quot;Username&quot; Width=&quot;100&quot; /&gt;
          &lt;/GridView&gt;
      &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>
  <p>Behind-Code</p>
  <pre><code>public partial class MainWindow : Window
  {
      private readonly ViewModel model;
      public MainWindow()
      {
          InitializeComponent();
          model = new ViewModel {
            Users = new ObservableCollection&lt;User&gt; 
              {
                new User 
                  {
                    Username=&quot;Admin&quot;   
                  }
              }
          };
          DataContext= model;
      }
  }
  public class ViewModel
  {
    public IEnumerable&lt;User&gt; Users { get; set; }
  }
      
  public class User
  {
    public string Username { get; set; }
  }
  </code></pre>