title: ComboBox with bound DisplayMember and ItemTemplate
body: <p>I have <code>ComboBox</code> bound to <code>DataView</code> with DisplayMemberPath bound to some string property:</p>
  
  <pre><code>&lt;ComboBox  DisplayMemberPath="{Binding SomeProperty}" ItemsSource="{Binding MyView}" /&gt;
  </code></pre>
  
  <p>My VM looks like this:</p>
  
  <pre><code>public class MyViewModel
  {
      DataTable dt = new DataTable();
      public MyViewModel()
      {
          dt.Columns.Add("MyColumn");
          dt.Rows.Add("AAA");
          dt.Rows.Add("BBB");
      }
  
      public DataView MyView
      {
          get { return dt.DefaultView; }
      }
  
      public string SomeProperty
      {
          get { return "MyColumn"; }
      }
  }
  </code></pre>
  
  <p>Now I want to customize the <code>ItemTemplate</code>:</p>
  
  <pre><code>    &lt;ComboBox.ItemTemplate&gt;
          &lt;DataTemplate &gt;
              &lt;StackPanel Orientation="Horizontal"&gt;
                  &lt;Rectangle Width="5" Height="5" Fill="Red" /&gt;
                  &lt;ContentControl Content="{Binding Path=???}" /&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ComboBox.ItemTemplate&gt;
  </code></pre>
  
  <p>Since the DisplayMemberPath is dynamic (and I can't use it with <code>ItemTemplate</code>), how do I specify the path?</p>
  
  <p>EDIT:</p>
  
  <p>This is my solution so far, but I think it's too complicated:</p>
  
  <pre><code>&lt;ContentControl.Content&gt;
      &lt;MultiBinding Converter="{StaticResource someMultiConverter}"&gt;
          &lt;Binding Path="DataContext.SomeProperty" ElementName="comboBox1" /&gt;
          &lt;Binding /&gt;
      &lt;/MultiBinding&gt;
  &lt;/ContentControl.Content&gt;
  </code></pre>
  
  <p>And converter:</p>
  
  <pre><code>public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              //throw new NotImplementedException();
              string path = values[0] as string;
              DataRowView drv = values[1] as DataRowView;
              return drv[path].ToString();
          }
  </code></pre>