/// <exclude /> protected override void OnMouseUp(MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Middle && IsMouseCaptured) { ReleaseMouseCapture(); DockItem.PerformClose(); e.Handled = true; } base.OnMouseUp(e); }