Поделиться через


Rect.Intersect Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Sub Intersect ( _
    rect As Rect _
)
public void Intersect(
    Rect rect
)

Parameters

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.