This commit is contained in:
NaBian committed 2021-03-28 12:41:08 +08:00
1 parent 0762db0fb4
commit ad83effdfe
1 file changed
+1 -2
@@ -239,7 +239,6 @@ namespace HandyControl.Controls
} }
_panel.Children.Clear(); _panel.Children.Clear();
var dataContext = DataContext;
foreach (var item in SelectedItems) foreach (var item in SelectedItems)
{ {
@@ -251,7 +250,7 @@ namespace HandyControl.Controls
Tag = checkComboBoxItem Tag = checkComboBoxItem
}; };
if (dataContext != null) if (ItemsSource != null)
{ {
tag.SetBinding(ContentControl.ContentProperty, new Binding(DisplayMemberPath) { Source = item }); tag.SetBinding(ContentControl.ContentProperty, new Binding(DisplayMemberPath) { Source = item });
} }