Shape Object (Abstract)

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

XAML
Must use derived objects.
Scripting
Must use derived objects.

Properties

Canvas.Left, Canvas.Top, Canvas.ZIndex, Clip, Cursor, Fill, Height, Name, Opacity, OpacityMask, RenderTransform, RenderTransformOrigin, Resources, Stretch, Stroke, StrokeDashArray, StrokeDashCap, StrokeDashOffset, StrokeEndLineCap, StrokeLineJoin, StrokeMiterLimit, StrokeStartLineCap, StrokeThickness, Tag, Triggers, Width

Methods

AddEventListener, CaptureMouse, Equals, FindName, GetHost, GetParent, GetValue, ReleaseMouseCapture, RemoveEventListener, SetValue

Events

Loaded, MouseEnter, MouseLeave, MouseLeftButtonDown, MouseLeftButtonUp, MouseMove

Derived Objects

Ellipse, Line, Path, Polygon, Polyline, Rectangle

Remarks

Shape is abstract, and is not returned as that object type by any APIs in Silverlight 1.0. 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 technically Shape is an intermediate class between UIElement and derived shapes such as Rectangle. 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 only be exercised on a practical derived class.

Path 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.

See Also

Shapes Overview
Silverlight Geometries Overview
Path