GetBounds (Stroke)


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

retval = object.GetBounds()

Type: Rect

The bounding box of the Stroke.

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.

var newRect = currentStroke.GetBounds();

Community Additions