title: Binding to Property of a ComboBox's SelectedItem
body: <p>I am having a hard time finding the right syntax for binding to a ComboBox's SelectedItem's property. This is the XAML I am trying to use for the binding. Where you see SelectedItem.Mode is the idea I am having difficulty with. Note that CurrentMode is in the ViewModel and has the same type as SelectedItem.Mode</p>
  
  <pre><code>&lt;ComboBox SelectedItem.Mode="{Binding Path=CurrentMode, Mode=TwoWays}"&gt;
              &lt;ComboBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Image Source="{Binding ImageSource}"/&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ComboBox.ItemTemplate&gt;
              &lt;local:ModeItem Mode="Free" ImageSource="pencil.png"/&gt;
              &lt;local:ModeItem Mode="Arrow" ImageSource="arrow.png"/&gt;
  
          &lt;/ComboBox&gt;
  </code></pre>
  
  <p>A local:ModeItem looks like this</p>
  
  <pre><code>    public class ModeItem : DependencyObject, INotifyPropertyChanged
  {
      public static readonly DependencyProperty ModeProperty = DependencyProperty.Register("Mode", typeof(AnnotationMode), typeof(ModeItem));
      public AnnotationMode Mode
      {
          get { return (AnnotationMode)GetValue(ModeProperty); }
          set { SetValue(ModeProperty, value); }
      }
      public string ImageSource { get; set; }
  
      public event PropertyChangedEventHandler PropertyChanged;
  }
  </code></pre>
  
  <p>I am using MVVM and trying to bind the AnnotationMode (CurrentMode) of the ViewModel to that of the ComboBox's SelectedItem's AnnotationMode (Mode)</p>