コード例 #1
0
ファイル: SelectGroup.cs プロジェクト: yunmiha/TizenFX
        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);
            }
        }
コード例 #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);
                }
            }
        }
コード例 #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);
                }
            }
        }