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