Windows Dev Center

Rect.Intersect Method

Finds the intersection of the rectangle represented by the current Rect and the rectangle represented by the specified Rect, and stores the result as the current Rect.

Namespace:  Windows.Foundation
Assembly:  System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)

public void Intersect(
	Rect rect
)

Parameters

rect
Type: Windows.Foundation.Rect

The rectangle to intersect with the current rectangle.

If no intersection exists, the current Rect becomes Rect.Empty.

Because this method alters the current Rect it acts upon even if there is no intersect, it is often a best practice to retain a copy before calling Intersect in case the intersect is empty or otherwise not a desirable value.

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft