AnalysisRegion.IntersectsWith Method
Determines whether the area of the AnalysisRegion intersects the specified rectangle.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Function IntersectsWith ( _
rectangle As Rect _
) As Boolean
'Usage
Dim instance As AnalysisRegion
Dim rectangle As Rect
Dim returnValue As Boolean
returnValue = instance.IntersectsWith(rectangle)
public bool IntersectsWith(
Rect rectangle
)
public:
bool IntersectsWith(
Rect rectangle
)
public function IntersectsWith(
rectangle : Rect
) : boolean
Parameters
rectangle
Type: System.Windows.RectThe rectangle with which to compare, in ink space coordinates.
Return Value
Type: System.Boolean
true if the area of the AnalysisRegion intersects with the specified rectangle; otherwise, false.
Remarks
The IntersectsWith method throws an ArgumentOutOfRangeException if rectangle has bounds located outside of MinXY and MaxXY.
Examples
This example tests whether the AnalysisRegion, named theFirstAnalysisRegion, intersects with a specified rectangle.
' Test for intersection between an AnalysisRegion and a rectangle.
If theFirstAnalysisRegion.IntersectsWith(New Rect(50, 50, 100, 100)) Then
' Insert code here.
End If
// Test for intersection between an AnalysisRegion and a rectangle.
if (theFirstAnalysisRegion.IntersectsWith(
new Rect(50, 50, 100, 100)))
{
// Insert code here.
}
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0