title: Use converter on bound items in combobox
body: <p>i have a combobox which is bound to a datatable column like this:</p>
  
  <pre><code>ComboBox.DataContext = DataDataTable;                
  ComboBox.DisplayMemberPath = DataDataTable.Columns["IDNr"].ToString();
  </code></pre>
  
  <p>The IDNr in the Column always starts with 4 letters followed with the ID Number (ex. BLXF1234) .
  I need to display the items in Combobox without the Letters (i need 1234 to be displayed in the combobox).</p>
  
  <p>So i wrote a converter :</p>
  
  <pre><code>class IDPrefixValueConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          if (value != null)
          {
              string s = value.ToString();
              if (s.Contains("BL"))
              {
                  return s.Substring(4);
              }
              else
              {
                  return s;
              }
          }
          return "";
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          throw new NotSupportedException();
      }       
  </code></pre>
  
  <p>No, how can i tell the combobox to use the converter to display the items ?
  i tried this in the Xaml:</p>
  
  <pre><code>ItemsSource="{Binding}" 
  DisplayMemberPath="{Binding Converter={StaticResource IDPrefixValueConverter}}"
  </code></pre>
  
  <p>But still not working ...any ideas ?
  Thanks</p>