Example #1
0
 protected void RemoveSelection(SelectButton selection)
 {
     if (!itemGroup.Contains(selection))
     {
         return;
     }
     selection.SelectedEvent -= OnSelectedEvent;
     itemGroup.Remove(selection);
 }
Example #2
0
 protected void AddSelection(SelectButton selection)
 {
     if (itemGroup.Contains(selection))
     {
         return;
     }
     itemGroup.Add(selection);
     selection.SelectedEvent += OnSelectedEvent;
 }
Example #3
0
        private void OnSelectedEvent(object sender, SelectButton.SelectEventArgs args)
        {
            SelectButton selection = sender as SelectButton;

            if (selection != null)
            {
                if (args.IsSelected == true)
                {
                    selectedIndex = selection.Index;
                    SelectionHandler(selection);
                }
            }
        }
Example #4
0
        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;
                }
            }
        }
Example #5
0
 public bool Contains(SelectButton selection)
 {
     return(itemGroup.Contains(selection));
 }
Example #6
0
 protected virtual void SelectionHandler(SelectButton selection)
 {
 }
Example #7
0
 public int GetIndex(SelectButton selection)
 {
     return(itemGroup.IndexOf(selection));
 }