コード例 #1
0
 protected void RemoveSelection(SelectButton selection)
 {
     if (!ItemGroup.Contains(selection))
     {
         return;
     }
     selection.SelectedChanged -= OnSelectedChanged;
     ItemGroup.Remove(selection);
 }
コード例 #2
0
ファイル: SelectGroup.cs プロジェクト: yunmiha/TizenFX
 protected internal void RemoveSelection(SelectButton selection)
 {
     if (!ItemGroup.Contains(selection))
     {
         return;
     }
     selection.SelectedChanged -= GroupSelectionHandler;
     ItemGroup.Remove(selection);
     selection.ResetItemGroup();
 }
コード例 #3
0
 protected void AddSelection(SelectButton selection)
 {
     if (null == selection)
     {
         return;
     }
     if (ItemGroup.Contains(selection))
     {
         return;
     }
     ItemGroup.Add(selection);
     selection.SelectedChanged += OnSelectedChanged;
 }
コード例 #4
0
ファイル: SelectGroup.cs プロジェクト: yunmiha/TizenFX
        protected internal void AddSelection(SelectButton selection)
        {
            if (null == selection)
            {
                return;
            }
            if (ItemGroup.Contains(selection))
            {
                return;
            }

            selection.RemoveFromGroup();
            ItemGroup.Add(selection);
            selection.SelectedChanged += GroupSelectionHandler;
        }
コード例 #5
0
ファイル: RadioButtonGroup.cs プロジェクト: walac/NUIPreview
        protected override void SelectionHandler(SelectButton selection)
        {
            RadioButton radio = selection as RadioButton;

            if (!ItemGroup.Contains(radio))
            {
                return;
            }

            foreach (RadioButton btn in ItemGroup)
            {
                if (btn != null && btn != radio && btn.IsEnabled == true)
                {
                    btn.IsSelected = false;
                }
            }
        }
コード例 #6
0
        protected override void SelectionHandler(SelectButton selection)
        {
            TabButton selectedTab = selection as TabButton;

            if (selectedTab == null)
            {
                throw new ArgumentNullException(nameof(selection), "selection should not be null.");
            }

            if (ItemGroup.Contains(selectedTab) == false)
            {
                throw new ArgumentException("selection does not exist in TabButtonGroup.", nameof(selection));
            }

            foreach (TabButton tabButton in ItemGroup)
            {
                if ((tabButton != null) && (tabButton != selectedTab) && (selectedTab.IsEnabled == true))
                {
                    tabButton.IsSelected = false;
                    tabButton.SetTabButtonState(ControlState.Normal);
                }
            }
        }
コード例 #7
0
 public bool Contains(SelectButton selection)
 {
     return(ItemGroup.Contains(selection));
 }