IXRShape (Compact 2013)

3/28/2014

This class represents the base class for shape elements, such as an ellipse, a path, and a rectangle.

Syntax

class IXRShape : public IXRFrameworkElement

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRShape

                IXREllipse

                IXRLine

                IXRPath

                IXRPolygon

                IXRPolyline

                IXRRectangle

Methods

Method

Description

IXRShape::GetFill

Retrieves the Brush that specifies how to paint the interior of this shape.

IXRShape::GetGeometryTransform

Retrieves the IXRMatrix object calculated by XAML for Windows Embedded that describes how the geometry of a shape is transformed before it is drawn on-screen.

IXRShape::GetStretch

Retrieves a value that describes how this shape fills its allocated space.

IXRShape::GetStroke

Retrieves the Brush that specifies how the outline of this shape object is painted.

IXRShape::GetStrokeDashArray

Retrieves a collection of float values that indicate the pattern of dashes and gaps that is used to outline a shape object.

IXRShape::GetStrokeDashCap

Retrieves a value that indicates how the ends of a dash are drawn on-screen.

IXRShape::GetStrokeDashOffSet

Retrieves a value that specifies the distance within the dash pattern where a dash begins.

IXRShape::GetStrokeEndLineCap

Retrieves a value that describes the shape at the end of a line in this shape object.

IXRShape::GetStrokeLineJoin

Retrieves a value that specifies the kind of vertices that are used when two lines or segments are connected in a shape object.

IXRShape::GetStrokeMiterLimit

Retrieves a limit on the ratio of the miter length to half the width of the stroke in a shape object.

IXRShape::GetStrokeStartLineCap

Retrieves a value that describes the shape located at the beginning of a stroke in a shape object.

IXRShape::GetStrokeThickness

Retrieves a value that describes the width of the outline of a stroke in a shape object.

IXRShape::SetFill

Sets the Brush that specifies how to paint the interior of this shape.

IXRShape::SetStretch

Sets a value that describes how this shape fills its allocated space.

IXRShape::SetStroke

Sets a Brush that specifies how the outline of this shape object is painted.

IXRShape::SetStrokeDashArray

Sets a collection of double values that indicate the pattern of dashes and gaps that is used to outline a shape object.

IXRShape::SetStrokeDashCap

Sets a value that indicates how the ends of a dash are drawn on-screen.

IXRShape::SetStrokeDashOffset

Sets a value that specifies the distance within the dash pattern where a dash begins.

IXRShape::SetStrokeEndLineCap

Sets a value that describes the shape at the end of a line in this shape object.

IXRShape::SetStrokeLineJoin

Sets a value that specifies the kind of vertices to use when two lines or segments are connected in a shape object.

IXRShape::SetStrokeMiterLimit

Sets a new limit on the ratio of the miter length to half the width of the stroke in a shape object.

IXRShape::SetStrokeStartLineCap

Sets a value that describes the new shape located at the beginning of a stroke in a shape object.

IXRShape::SetStrokeThickness

Sets a value that describes the width of the outline of a stroke in a shape object.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

An IXRShape object is a kind of UI element that enables you to draw a shape, such as a path, line, or ellipse, onto the screen. Shape objects can be used inside many different container objects such as IXRGrid and IXRCanvas.

An IXRPath object derives from IXRShape. A path element is a shape. However, instead of being defined by discrete properties, the shape of a path element is defined either as a geometry data which is held in its associated IXRGeometry object that is retrievable by using IXRPath::GetData. Or, its shape is defined through a mini-language that is declared in XAML markup.

You can access an existing IXRShape derived object in the visual tree by obtaining a pointer to a visual host, retrieving the host's root element, traversing the element tree, and then calling IUnknown::QueryInterface on a named object in the visual tree. Or, you can create a new IXRShape derived object yourself and insert it into a generated visual tree, as an alternative to declaring it in the source XAML for your application.

A shape object can also be declared in XAML. When you load the source XAML for your application, the shape object is added to the element tree. For more information about how to create a shape object in XAML (by using elements such as <Line>, <Ellipse>, and <Rectangle>), see Remarks in the class topic for the specific IXRShape derived class.

When you create a class instance, use an IXRShapePtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

System.Windows.Shapes.Shape

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management