2013-05-28 78 views
2

我想让我的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" /> 
+3

您是否期望它像自动完成框一样工作?在ComboBox中进行编辑的目的是允许输入列表中尚不存在的类似TextBox的值,以及从可用项目(因此组合)中进行选择。 –

+0

是的,我期待像自动完成框。 –

回答