Exemple #1
0
 public void AddButton(HeaderButton button)
 {
     button.Click += ButtonOnClick;
     button.Margin = new Thickness(10, 0, 0, 0);
     Children.Add(button);
     if (button.Selected)
     {
         Current = button;
     }
 }
Exemple #2
0
        public void SetCurrentButton(HeaderButton button)
        {
            foreach (var child in Children.Cast <HeaderButton>())
            {
                if (child == button)
                {
                    Current          = child;
                    Current.Selected = true;
                    continue;
                }
                child.Selected = false;
            }

            if (OnSelectionChange != null)
            {
                OnSelectionChange(button);
            }
        }