示例#1
0
 private void OnTabControlItemClosing(TabControlItemClosingEventArgs e)
 {
     if (this.TabControlItemClosing != null)
     {
         this.TabControlItemClosing(e);
     }
 }
示例#2
0
        public void CloseTab(TabControlItem tabItem)
        {
            if (tabItem != null)
            {
                this.SelectedItem = tabItem;
                TabControlItemClosingEventArgs args = new TabControlItemClosingEventArgs();
                this.OnTabControlItemClosing(args);

                if (this.SelectedItem != null && !args.Cancel && this.SelectedItem.CanClose)
                {
                    this.RemoveTab(this.SelectedItem);
                    this.OnTabControlItemClosed(EventArgs.Empty);
                }
            }
        }
示例#3
0
 private void OnTabControlItemClosing(TabControlItemClosingEventArgs e)
 {
     if (this.TabControlItemClosing != null)
         this.TabControlItemClosing(e);
 }
示例#4
0
        public void CloseTab(TabControlItem tabItem)
        {
            if (tabItem != null)
            {
                this.SelectedItem = tabItem;
                TabControlItemClosingEventArgs args = new TabControlItemClosingEventArgs();
                this.OnTabControlItemClosing(args);

                if (this.SelectedItem != null && !args.Cancel && this.SelectedItem.CanClose)
                {
                    this.RemoveTab(this.SelectedItem);
                    this.OnTabControlItemClosed(EventArgs.Empty);
                }
            }
        }