组合框上的IsEditable没有效果

时间:2013-05-28 13:41:04

标签: c# wpf combobox

我想让ComboBox可编辑。我的Combobox会显示一个国家/地区列表,我希望我的用户能够在该国家/地区输入内容进行搜索。但是,在目前的状态下,它并没有这样做。我做错了什么?

<ComboBox x:Name="CmbCountryList" Width="150" 
    IsEditable="True" IsTextSearchEnabled="True" 
    IsTextSearchCaseSensitive="False" StaysOpenOnEdit="True"
    TextSearch.TextPath="CountryName"  
    ItemsSource="{Binding CountryMasterList,  Mode=TwoWay}"  
    DisplayMemberPath="CountryName" 
    SelectedValuePath="CountryID" 
    SelectedItem="{Binding Path=CountryObj, Mode=TwoWay, ValidatesOnDataErrors=True}" 
    Text="{Binding Path=CountryName,  Mode=TwoWay}" 
    IsSynchronizedWithCurrentItem="False" />

1 个答案:

答案 0 :(得分:0)

检查http://weblogs.asp.net/okloeten/archive/2007/11/12/5088649.aspx以获取如何实现此目的的示例。

相关问题