Beispiel #1
0
 /// <summary>
 /// Adds a two-state button to this group.
 /// </summary>
 /// <param name="button">The button to be added</param>
 public virtual void Add(ToggleButton button)
 {
     if (button != null && !group.Contains(button))
     {
         group.Add(button);
         button.ActionPerformedEvent += handler;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Removes a two-state button from this group.
        /// </summary>
        /// <param name="button">The button to be removed</param>
        /// <returns></returns>
        public virtual bool Remove(ToggleButton button)
        {
            bool removed = group.Remove(button);
            if (removed)
                button.ActionPerformedEvent -= handler;

            return removed;
        }