title: Binding DataContext Window to ViewModel
body: <p>Ok, I tried it several ways, but none worked as it should be in my case. I have a simple Window with a single ComboBox. I am changing the code to MVVM, so now everything is still in the Code-Behind and should go to a ViewModel, etc.<br>
  But even on the first step (binding the ViewModel to the View/Window) I don't seem to be able to bind them together.<br><br>
  My Window XAML:</p>
  
  <pre><code>&lt;Window x:Class="CustomerGuidance.ClientWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:VM="clr-namespace:CustomerGuidance.ViewModels"
      Title="Stop'n'Go - Client" Height="22" Width="229"
      Loaded="ClientWindow_OnLoaded" WindowStyle="None" 
      WindowStartupLocation="Manual" Top="0" Left="0"
      ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True"&gt;
  &lt;Window.DataContext&gt;
      &lt;VM:EmployeeViewModel /&gt;
  &lt;/Window.DataContext&gt;
  &lt;Canvas Background="Gainsboro"&gt;
      &lt;ComboBox Name="EmployeesComboBox"
                ItemsSource="{Binding EmployeeEntries}"
                Width="192" FontFamily="Arial" FontSize="14"&gt;
          &lt;ComboBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;TextBlock Text="{Binding Lastname}" /&gt;
                      &lt;TextBlock Text=", " /&gt;
                      &lt;TextBlock Text="{Binding Surname}" /&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ComboBox.ItemTemplate&gt;
      &lt;/ComboBox&gt;
  &lt;/Canvas&gt;
  </code></pre>
  
  <p></p>
  
  <p>The ViewModel looks like this:</p>
  
  <pre><code>using System.Collections.ObjectModel;
  using System.ComponentModel;
  
  namespace CustomerGuidance.ViewModels
  {
      public class EmployeeViewModel : INotifyPropertyChanged
      {
          public EmployeeViewModel()
          {
          }
  
          public static ObservableCollection&lt;ServerWindow.EmployeeEntry&gt; EmployeeEntries { get; set; } = new ObservableCollection&lt;ServerWindow.EmployeeEntry&gt;();
  
          private string _surname;
          private string _lastname;
          private int _id;
  
          public string Surname
          {
              get { return _surname; }
              set
              {
                  if (_surname == value)
                      return;
                  _surname = value;
                  NotifyPropertyChanged("Surname");
              }
          }
  
          public string Lastname
          {
              get { return _lastname; }
              set
              {
                  if (_lastname == value)
                      return;
                  _lastname = value;
                  NotifyPropertyChanged("Lastname");
              }
          }
  
          public int Id
          {
              get { return _id; }
              set
              {
                  if (_id == value)
                      return;
                  _id = value;
                  NotifyPropertyChanged("Id");
              }
          }
  
          public virtual event PropertyChangedEventHandler PropertyChanged;
  
          protected virtual void NotifyPropertyChanged(string propertyName)
          {
              PropertyChangedEventHandler handler = PropertyChanged;
              handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  }
  </code></pre>
  
  <p>I get the following error message: "The Name "EmployeeViewModel" is not available in the namespace "clr-namespace:CustomerGuidance.ViewModels".<br>And now the question: What am I missing? How can I bind the ViewModel to my window-XAML?</p>