internal bool RaiseTabItemClosingEvent(CushTabItem closingItem) { if (TabItemClosingEvent == null) return false; foreach (var @delegate in TabItemClosingEvent.GetInvocationList()) { var subHandler = (TabItemClosingEventHandler) @delegate; var args = new TabItemClosingEventArgs(closingItem); subHandler.Invoke(this, args); if (args.Cancel) return true; } return false; }
internal TabItemClosingEventArgs(CushTabItem item) { ClosingTabItem = item; }