title: How to set a class in the DataContext with XAML?
body: <p>I have a WPF forms and a class Users (content attributes Id, Login and Name), in my class of this forms, I had get a Users object for put this information in the form with <code>DataContext</code> and <code>Binding</code> </p>
  
  <p>I can put this Users object to my <code>Window.DataContext (this.DataContext = usersObject;)</code> with code behind, but I think if I can make this with XAML, maybe is better</p>
  
  <p>I have set a attribute in my class UserForm (<code>public Users usersObject {get; set;}</code>)</p>
  
  <p>My form <code>UserForm : Window</code></p>
  
  <pre><code>&lt;Window DataContext="{What need I put here?"&gt;
      &lt;Grid&gt;
          &lt;TextBlock Text="Id:"/&gt;
          &lt;TextBox Name="Id" Text="{Binding Path=Id}"/&gt;
  
          &lt;TextBlock Text="Login:"/&gt;
          &lt;TextBox Name="Login" Text="{Binding Path=Login}"/&gt;
  
          &lt;TextBlock Text="Name:"/&gt;
          &lt;TextBox Name="Name" Text="{Binding Path=Name}"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>UserForm.xaml.cs</p>
  
  <pre><code>public class UserForm : Window
  {
      public Users userObject { get; set; }
  
      public UserForm(Users user)
      {
          InitializeComponent();
          this.userObject = user;
      }
  }
  </code></pre>
  
  <p>My class Users</p>
  
  <pre><code>public class Users
  {
      public int Id { get; set; }
      public string Login { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>How to I do for set <code>userObject</code> in the itself <code>Window.DataContext</code> for TextBox's can put it values?</p>