From f4adf35e49a0d50cc80ff444872b9f79fef7141e Mon Sep 17 00:00:00 2001 From: John Colvin Date: Mon, 9 Sep 2024 00:14:36 -0400 Subject: [PATCH] fix: Use ComboCheckBoxItem.IsSelectedProperty Instead of Selector.IsSelectedProperty. Unlike ComboBoxItem, ComboCheckItem's IsSelectedProperty isn't linked to Selector.IsSelectedProperty. --- .../spark/view/Controls/ComboCheckBox/ComboCheckBox.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/spark/view/Controls/ComboCheckBox/ComboCheckBox.xaml.cs b/src/client/spark/view/Controls/ComboCheckBox/ComboCheckBox.xaml.cs index 776fd5521..6e03961b0 100644 --- a/src/client/spark/view/Controls/ComboCheckBox/ComboCheckBox.xaml.cs +++ b/src/client/spark/view/Controls/ComboCheckBox/ComboCheckBox.xaml.cs @@ -224,7 +224,7 @@ namespace mbts.ui.controls { private void _set_is_selected(object item, bool is_selected) { ComboCheckBoxItem container = ItemContainerGenerator.ContainerFromItem(item) as ComboCheckBoxItem; - container?.set_current_if_changed(IsSelectedProperty, is_selected); + container?.set_current_if_changed(ComboCheckBoxItem.IsSelectedProperty, is_selected); } private void item_Selected(object sender, RoutedEventArgs e) { @@ -253,7 +253,7 @@ namespace mbts.ui.controls { private void item_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { using (_selection_change()) { - ((ComboCheckBoxItem)sender).set_current_if_changed(IsSelectedProperty, SelectedItems.Contains(e.NewValue)); + ((ComboCheckBoxItem)sender).set_current_if_changed(ComboCheckBoxItem.IsSelectedProperty, SelectedItems.Contains(e.NewValue)); } }