fix: Use ComboCheckBoxItem.IsSelectedProperty
Instead of Selector.IsSelectedProperty. Unlike ComboBoxItem, ComboCheckItem's IsSelectedProperty isn't linked to Selector.IsSelectedProperty.
This commit is contained in:
1 parent
90128863d9
commit
f4adf35e49
1 file changed
+2
-2
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user