带搜索的ComboBox就是给ComboBox一个依赖属性的ItemSource,然后通过数据源中是否包含要查询的值,重新给ComboBox绑定数据源. public class EditComboBox : ComboBox { private bool t = true;//首次获取焦点标志位 private ObservableCollection<object> bindingList = new ObservableCollection<object>();//数据源绑定
参见这篇文章:https://blogs.msdn.microsoft.com/wsdevsol/2016/09/14/combobox-from-an-appbarbutton-loses-mouse-input-on-1607/ Several developers have asked why a ComboBox on a Flyout attached to an AppBarButton ignores mouse clicks after upgrading their UWP a