protected override bool UpdateClipRegionCore(IntPtr hWnd, int showCmd, ClipRegionChangeType changeType, Int32Rect currentBounds) { if (base.UpdateClipRegionCore(hWnd, showCmd, changeType, currentBounds)) { return(true); } if (changeType != ClipRegionChangeType.FromUndockSingleTab) { return(false); } SetRoundRect(hWnd, currentBounds.Width, currentBounds.Height); return(true); }
protected void UpdateClipRegion(ClipRegionChangeType regionChangeType = ClipRegionChangeType.FromPropertyChange) { var hwndSource = (HwndSource)PresentationSource.FromVisual(this); if (hwndSource == null) { return; } RECT lpRect; NativeMethods.GetWindowRect(hwndSource.Handle, out lpRect); var windowPlacement = NativeMethods.GetWindowPlacement(hwndSource.Handle); UpdateClipRegion(hwndSource.Handle, windowPlacement, regionChangeType, lpRect); }
private void UpdateClipRegion(IntPtr hWnd, WINDOWPLACEMENT placement, ClipRegionChangeType changeType) { if (placement.showCmd == ShowWindowOption.SW_MAXIMIZE) { ClipMaximizedRegion(hWnd); } else if (changeType != ClipRegionChangeType.FromSize && changeType != ClipRegionChangeType.FromPropertyChange && _lastShowCmd == placement.showCmd) { // do nothing } else { ClearClipRegion(hWnd); } _lastShowCmd = placement.showCmd; }
protected virtual bool UpdateClipRegionCore(IntPtr hWnd, int showCmd, ClipRegionChangeType changeType, Int32Rect currentBounds) { if (showCmd == 3) { UpdateMaximizedClipRegion(hWnd); return(true); } if (changeType != ClipRegionChangeType.FromSize && changeType != ClipRegionChangeType.FromPropertyChange && _lastWindowPlacement == showCmd) { return(false); } if (CornerRadius < 0) { ClearClipRegion(hWnd); } else { SetRoundRect(hWnd, currentBounds.Width, currentBounds.Height); } return(true); }
private void UpdateClipRegion(IntPtr hWnd, Windowplacement placement, ClipRegionChangeType changeType, RECT currentBounds) { UpdateClipRegionCore(hWnd, placement.showCmd, changeType, currentBounds.ToInt32Rect()); _lastWindowPlacement = placement.showCmd; }
protected virtual bool UpdateClipRegionCore(IntPtr hWnd, int showCmd, ClipRegionChangeType changeType, Int32Rect currentBounds) { if (showCmd == 3) { UpdateMaximizedClipRegion(hWnd); return true; } if (changeType != ClipRegionChangeType.FromSize && changeType != ClipRegionChangeType.FromPropertyChange && _lastWindowPlacement == showCmd) return false; if (CornerRadius < 0) ClearClipRegion(hWnd); else SetRoundRect(hWnd, currentBounds.Width, currentBounds.Height); return true; }
protected void UpdateClipRegion(ClipRegionChangeType regionChangeType = ClipRegionChangeType.FromPropertyChange) { var hwndSource = (HwndSource) PresentationSource.FromVisual(this); if (hwndSource == null) return; RECT lpRect; NativeMethods.GetWindowRect(hwndSource.Handle, out lpRect); var windowPlacement = NativeMethods.GetWindowPlacement(hwndSource.Handle); UpdateClipRegion(hwndSource.Handle, windowPlacement, regionChangeType, lpRect); }
protected override bool UpdateClipRegionCore(IntPtr hWnd, int showCmd, ClipRegionChangeType changeType, Int32Rect currentBounds) { return false; }
protected override bool UpdateClipRegionCore(IntPtr hWnd, int showCmd, ClipRegionChangeType changeType, Int32Rect currentBounds) { return(false); }