private void GroupSelectionHandler(object sender, SelectedChangedEventArgs args) { if (isSelectionChanging) { return; } if (sender is SelectButton selection) { isSelectionChanging = true; if (args.IsSelected == true) { selectedIndex = selection.Index; if (EnableMultiSelection == false) { foreach (SelectButton btn in ItemGroup) { if ((btn != null) && (btn != selection) && (btn.IsEnabled == true) && (btn.IsSelected == true)) { btn.IsSelected = false; } } } } isSelectionChanging = false; OnSelectedChanged(selection); } }
private void OnSelectedChanged(object sender, SelectedChangedEventArgs args) { SelectButton selection = sender as SelectButton; if (selection != null) { if (args.IsSelected == true) { selectedIndex = selection.Index; if (EnableMultiSelection == false) { foreach (SelectButton btn in ItemGroup) { if ((btn != null) && (btn != selection) && (btn.IsEnabled == true) && (btn.IsSelected == true)) { btn.IsSelected = false; } } } SelectionHandler(selection); } } }
private void OnSelectedChanged(object sender, SelectedChangedEventArgs args) { SelectButton selection = sender as SelectButton; if (selection != null) { if (args.IsSelected == true) { selectedIndex = selection.Index; SelectionHandler(selection); } } }