我在 MVVM 中使用 AutoCompleteBox,并且我只想在用户单击项目或用户按 Enter 时执行某些操作。
但是现在当我使用键盘上的 down\Up 键时, selectedItem 属性会发生变化......
我的控制:
<Controls:AutoCompleteBox ItemsSource="{Binding IndicationDtos, Mode=TwoWay}"
Width="100" SelectedItem="{Binding IndicationSelected, Mode=TwoWay}"
ValueMemberPath="Diagnosis" Text="{Binding Criteria, Mode=TwoWay}" MinimumPopulateDelay="250"/>
我该怎么做才能使属性“SelectedItem”仅在 Enter 或单击时分配?
如果你有任何问题...
多谢