Provides a base class for shape elements, such as the Ellipse, Polygon, and Rectangle objects.

See Derived Objects for syntax information.

Shape is abstract, and it is not returned as that object type by any JavaScript APIs for Silverlight. You also cannot create a true Shape in XAML. For this reason, Shape is not listed in the "Applies To" lists for various UIElement APIs, even though Shape is technically an intermediate class between UIElement and derived shapes such as a Rectangle object. Shape is also not listed in the "Applies To" lists for APIs that Shape itself defines, again because it is abstract and those APIs can be used only on a practical derived class.

The Path object is a shape, but rather than being defined by discrete properties, the shape of a path is defined either as a geometry provided to the Data property, or through a Path mini-language.

For more information on basic concepts, see Shapes and Drawing. Note that the Shapes and Drawing topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.


Community Additions