File tree Expand file tree Collapse file tree
src/WPFDevelopers.Shared/Controls/MultiSelectComboBox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,58 +236,6 @@ protected override void OnSelectionChanged(SelectionChangedEventArgs e)
236236 _isUpdating = true ;
237237 try
238238 {
239- //if (SelectedItemsExt is IList list)
240- //{
241- // //if (list.Count > 0)
242- // // list.Clear();
243- // //foreach (var itme in SelectedItems.Cast<object>())
244- // //{
245- // // list.Add(itme);
246- // //}
247-
248-
249- // //var items = SelectedItems.Cast<object>().ToList();
250- // //int count = items.Count;
251-
252- // //if (count == 0)
253- // //{
254- // // list.Clear();
255- // // return;
256- // //}
257-
258- // //if (list is INotifyCollectionChanged observableList)
259- // //{
260- // // observableList.CollectionChanged -= OnSelectedItemsExtCollectionChanged;
261- // // try
262- // // {
263- // // list.Clear();
264-
265- // // for (int i = 0; i < count - 1; i++)
266- // // {
267- // // list.Add(items[i]);
268- // // }
269- // // }
270- // // finally
271- // // {
272- // // observableList.CollectionChanged += OnSelectedItemsExtCollectionChanged;
273- // // if (count > 0)
274- // // {
275- // // list.Add(items[count - 1]);
276- // // }
277- // // }
278- // //}
279- // //else
280- // //{
281- // // list.Clear();
282- // // foreach (var itm in items)
283- // // {
284- // // list.Add(itm);
285- // // }
286- // //}
287-
288-
289- //}
290-
291239 if ( SelectedItemsExt is IList list && SelectedItemsExt is INotifyCollectionChanged notifier )
292240 {
293241 var eventField = notifier . GetType ( ) . GetField ( "CollectionChanged" ,
@@ -662,9 +610,6 @@ private void SearchText(string text)
662610 selectedItems . Clear ( ) ;
663611 foreach ( var item in _listViewSearch . Items )
664612 {
665- //if (SelectedItems.Contains(item))
666- // if (!_listViewSearch.SelectedItems.Contains(item))
667- // _listViewSearch.SelectedItems.Add(item);
668613 if ( SelectedItems . Contains ( item ) )
669614 {
670615 if ( ! _listViewSearch . SelectedItems . Contains ( item ) )
You can’t perform that action at this time.
0 commit comments