WPF Cobobox Selected Item Content RRS feed

  • Question

  • I would like to bind the Selected Item Content of combobox to a string Property in WPF. 

     <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,408,359,0" Name="myComboBox" VerticalAlignment="Top" Width ="120" DataContext="{Binding Car}" SelectedValue="{Binding Path=CarModel, Mode=TwoWay,ValidatesOnDataErrors =True}"> 

    <ComboBoxItem Content="Old" />

    <ComboBoxItem Content="new" />

    <ComboBoxItem Content="veryold" />


    From above code i could see the carmodel as

    System.Windows.Controls.ComboBoxItem: Old

    But i want "Old" Only.

    Thanks in Advance




















    Monday, April 11, 2011 11:21 AM

All replies

  • Hi All, telereik provides a combox with text property where the selected value content can be binded to it.

    Thanks to Telerik.

    Thank You All.


    Tuesday, April 12, 2011 12:23 PM