[]
        
(Showing Draft Content)

C1.Framework.Element.GetBounds

GetBounds Method

GetBounds(Element)

Gets the element's bounds (size and location) within an arbitrary ancestor, in pixels.

Ancestor element (parent, grand-parent, etc). A Rectangle that corresponds to the element's position within the given ancestor.
Declaration
public Rectangle GetBounds(Element ancestor)
Parameters
Type Name Description
Element ancestor
Returns
Type Description
Rectangle

GetBounds(Element, bool, bool)

Gets the element's bounds (size and location) within an arbitrary ancestor, in pixels.

Declaration
public Rectangle GetBounds(Element ancestor, bool contentArea, bool clip)
Parameters
Type Name Description
Element ancestor

Ancestor element (parent, grand-parent, etc).

bool contentArea

Whether to return the element's outer bounds or content area.

bool clip

Whether to clip the rectangle to the ancestor's content area.

Returns
Type Description
Rectangle

A Rectangle that corresponds to the element's position within the given ancestor.