private static void SelectionScopePropertyChanged(DependencyObject d, SelectionScope oldSelectionScope, SelectionScope newSelectionScope) { if (oldSelectionScope != null && ReferenceEquals(oldSelectionScope.SelectedItem, d)) { SetIsSelectedInt(d, false); } if (newSelectionScope != null && ReferenceEquals(newSelectionScope.SelectedItem, d)) { SetIsSelectedInt(d, true); } }
public static void SetSelectionScope(DependencyObject element, SelectionScope value) { element.SetValue(SelectionScopeProperty, value); }