SelectTab() public méthode

public SelectTab ( Tab tabSelect ) : void
tabSelect Tab
Résultat void
        private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Canvas parentForm  = this.Parent as Canvas;
            Grid   parentForm2 = parentForm.Parent as Grid;
            TabBar parentForm3 = parentForm2.Parent as TabBar;

            parentForm3.SelectTab(this);
        }
Exemple #2
0
 private void Tab_Loaded(object sender, RoutedEventArgs e)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         TabBar tb = this.FindParent <TabBar>();
         mainWindow.container.Children.Add(form);
         tb.SelectTab(this);
         if (tb.TabCollection.Count > 0)
         {
             for (var i = 0; i < tb.TabCollection.Count - 1; i++)
             {
                 tb.SelectTab(tb.TabCollection[i + 1]);
             }
         }
         if (this.ActualWidth - (CloseTab.ActualWidth + closeTabMargin) > 0)
         {
             label_TabTitle.Width = this.ActualWidth - (CloseTab.ActualWidth + closeTabMargin);
         }
         label_TabTitle.Margin = new Thickness(6, 1, 0, 0);
     }));
 }
Exemple #3
0
        private async void Me_MouseDown(object sender, MouseButtonEventArgs e)
        {
            TabBar tb = this.FindParent <TabBar>();

            tb.SelectTab(this);

            if (form.GetType() == typeof(TabView))
            {
                TabView tv = (form as TabView);
                await tv.ChangeColor();
            }
        }
 private void Tab_Loaded(object sender, RoutedEventArgs e)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         Canvas parentForm = this.Parent as Canvas;
         Grid parentForm2 = parentForm.Parent as Grid;
         TabBar parentForm3 = parentForm2.Parent as TabBar;
         mainWindow.container.Children.Add(form);
         parentForm3.SelectTab(this);
         if (parentForm3.TabCollection.Count > 0)
         {
             for (var i = 0; i < parentForm3.TabCollection.Count - 1; i++)
             {
                 parentForm3.SelectTab(parentForm3.TabCollection[i + 1]);
             }
         }
         if (this.ActualWidth - (CloseTab.ActualWidth + closeTabMargin) > 0)
         {
             label_TabTitle.Width = this.ActualWidth - (CloseTab.ActualWidth + closeTabMargin);
         }
         label_TabTitle.Margin = new Thickness(6, 1, 0, 0);
     }));
 }