Megosztás a következőn keresztül:


RectHelper.Contains(Rect, Point) Method

Definition

Returns whether a given Point is within the bounds of a given Rect, for a shared coordinate reference. C# and Microsoft Visual Basic code should use Rect.Contains instead.

public:
 static bool Contains(Rect target, Point point);
 static bool Contains(Rect const& target, Point const& point);
public static bool Contains(Rect target, Point point);
function contains(target, point)
Public Shared Function Contains (target As Rect, point As Point) As Boolean

Parameters

target
Rect

The Rect to evaluate.

point
Point

The Point to check for containment.

Returns

Boolean

bool

true if point is within the target bounds; otherwise, false.

Applies to