private void OnTabControlItemClosing(TabControlItemClosingEventArgs e) { if (this.TabControlItemClosing != null) { this.TabControlItemClosing(e); } }
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); } } }
private void OnTabControlItemClosing(TabControlItemClosingEventArgs e) { if (this.TabControlItemClosing != null) this.TabControlItemClosing(e); }