Geometry Object (Abstract)

Provides a base class for objects that define geometric shapes. Geometry objects can be used for clipping regions and as geometry definitions for rendering 2-D graphic data as a Path.

Must use derived objects.
Must use derived objects.


For XAML syntaxes that take a Geometry, you need to specify a nonabstract derived type of Geometry as an object element. For details, see the XAML syntax on the reference pages for EllipseGeometry, GeometryGroup, LineGeometry, PathGeometry, or RectangleGeometry.

Geometry is abstract, and is not returned as that object type by any APIs in Silverlight 1.0. You also cannot create a true Geometry in XAML. For this reason, Geometry is not listed in the "Applies To" lists for APIs that Geometry itself defines, because it is abstract and those APIs can only be exercised on a practical derived class.

Geometries can be conceptualized as being "simple" or "complex" geometries. EllipseGeometry, LineGeometry and RectangleGeometry are the simple geometries, which specify the geometrical shape as one element with basic coordinate or dimension properties. GeometryGroup and PathGeometry are the complex geometries. GeometryGroup combines other geometries that it holds as child objects. PathGeometry uses either a set of nested figure/segment path definition elements or a compact string syntax to describe a path for the geometry. For more information, see Geometry Overview or Path Markup Syntax.

A Geometry does not entirely define its own rendering. Instead, a Geometry is provided as data for a Path.

See Also

Geometry Overview
Path Markup Syntax

Community Additions