Share via


GetBounds (Stroke)

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

Returns a Rect that is the bounding box of a Stroke.

retval = object.GetBounds()

Return Value

Type: Rect

The bounding box of the Stroke.

Managed Equivalent

GetBounds

Remarks

Do not attempt to set values in the returned Rect; it should be used for reference only.

Scenarios for this method include using the returned Rect as input for a RectangleGeometry that will display the bounding box in the user interface, or checking for intersecting strokes or other types of hit-testing.

Example

var newRect = currentStroke.GetBounds();

Applies To

Stroke