/// <summary>
        /// Selektieren eines Tabs mit Index
        /// </summary>
        public void SelectTab(int index)
        {
            tabListStack.Controls.ElementAt(SelectedTabIndex).Background = TabBrush;
            SelectedTabIndex = index;
            tabListStack.Controls.ElementAt(index).Background = TabActiveBrush;

            tabPage.Content = Pages.ElementAt(SelectedTabIndex);

            if (TabIndexChanged != null)
            {
                TabIndexChanged.Invoke(this, Pages.ElementAt(index), SelectedTabIndex);
            }
        }
Beispiel #2
0
 private void buttonTab_Click(object sender, RoutedEventArgs e)
 {
     buttonTab1.IsChecked = Equals(sender, buttonTab1);
     buttonTab2.IsChecked = Equals(sender, buttonTab2);
     buttonTab3.IsChecked = Equals(sender, buttonTab3);
     buttonTab4.IsChecked = Equals(sender, buttonTab4);
     buttonTab5.IsChecked = Equals(sender, buttonTab5);
     if (TabIndexChanged != null)
     {
         TabIndexChanged.Invoke(this, new EventArgs());
     }
     ShowDockPanel(sender);
 }
        /// <summary>
        /// Selektieren eines Tabs mit Page
        /// </summary>
        public void SelectTab(TabPage page)
        {
            try
            {
                tabListStack.Controls.ElementAt(SelectedTabIndex).Background = TabBrush;
                SelectedTabIndex = Pages.IndexOf(page);
            }
            finally
            {
                tabListStack.Controls.ElementAt(SelectedTabIndex).Background = TabActiveBrush;
                tabPage.Content = Pages.ElementAt(SelectedTabIndex);

                if (TabIndexChanged != null)
                {
                    TabIndexChanged.Invoke(this, page, SelectedTabIndex);
                }
            }
        }
 public virtual void OnTabIndexChanged()
 {
     TabIndexChanged?.Invoke(this, null);
 }
Beispiel #5
0
 private void OnTabIndexChanged(object sender, EventArgs e)
 {
     TabIndexChanged?.Invoke(sender, e);
 }
Beispiel #6
0
        /// <summary>
        /// Raises the TabIndexChanged event.
        /// </summary>
        /// <param name="e">An EventArgs containing the event data.</param>
        protected override void OnTabIndexChanged(EventArgs e)
        {
            TabIndexChanged?.Invoke(this, e);

            base.OnTabIndexChanged(e);
        }