/// <inheritdoc /> public virtual bool OnWindowClosing(IDockWindow?window) { var canClose = window?.OnClose() ?? true; var eventArgs = new WindowClosingEventArgs(window) { Cancel = !canClose }; WindowClosing?.Invoke(this, eventArgs); return(!eventArgs.Cancel); }
/// <inheritdoc /> public virtual bool OnWindowMoveDragBegin(IDockWindow?window) { var canMoveDrag = window?.OnMoveDragBegin() ?? true; var eventArgs = new WindowMoveDragBeginEventArgs(window) { Cancel = !canMoveDrag }; WindowMoveDragBegin?.Invoke(this, eventArgs); return(!eventArgs.Cancel); }
/// <summary> /// Initializes new instance of the <see cref="WindowMoveDragEventArgs"/> class. /// </summary> /// <param name="window">The dragged window.</param> public WindowMoveDragEventArgs(IDockWindow?window) { Window = window; }
/// <inheritdoc /> public virtual void OnWindowMoveDragEnd(IDockWindow?window) { window?.OnMoveDragEnd(); WindowMoveDragEnd?.Invoke(this, new WindowMoveDragEndEventArgs(window)); }
/// <inheritdoc /> public virtual void OnWindowClosed(IDockWindow?window) { WindowClosed?.Invoke(this, new WindowClosedEventArgs(window)); }
/// <summary> /// Initializes new instance of the <see cref="WindowOpenedEventArgs"/> class. /// </summary> /// <param name="window">The opened window.</param> public WindowOpenedEventArgs(IDockWindow?window) { Window = window; }
/// <summary> /// Initializes new instance of the <see cref="WindowClosedEventArgs"/> class. /// </summary> /// <param name="window">The closed window.</param> public WindowClosedEventArgs(IDockWindow?window) { Window = window; }
/// <summary> /// Initializes new instance of the <see cref="WindowAddedEventArgs"/> class. /// </summary> /// <param name="window">The added window.</param> public WindowAddedEventArgs(IDockWindow?window) { Window = window; }
/// <summary> /// Initializes new instance of the <see cref="WindowRemovedEventArgs"/> class. /// </summary> /// <param name="window">The removed window.</param> public WindowRemovedEventArgs(IDockWindow?window) { Window = window; }