Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
                }
            }
        }
Exemplo n.º 3
0
        private void OnSelectedChanged(object sender, SelectedChangedEventArgs args)
        {
            SelectButton selection = sender as SelectButton;

            if (selection != null)
            {
                if (args.IsSelected == true)
                {
                    selectedIndex = selection.Index;
                    SelectionHandler(selection);
                }
            }
        }