次の方法で共有


IXRShape::SetStrokeDashArray (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

virtual HRESULT STDMETHODCALLTYPE SetStrokeDashArray(
    IXRDoubleCollection *pStrokeDashArray
) = 0; 

Parameters

  • pStrokeDashArray
    [in] Pointer to an IXRDoubleCollection object that provides access to an ordered collection of float values that indicates the pattern of dashes and gaps that is used to outline a shape object.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

Each float value in the retrieved collection specifies the length of a dash or gap as compared with the XRThickness structure associated with the outline of the shape. For example, a value of 1 creates a dash or gap that has the same length as the thickness of the outline, which results in two-dimensional squares appearing as dashes.

The first item in the collection, which is located at index 0, specifies the length of a dash. The second item, which is located at index 1, specifies the length of a gap.

Objects that have an even index value specify dashes; objects that have an odd index value specify gaps.

Generally, you should use integral numeric values. Non-integral values can cause sub-pixel rendering, and might alter the apparent color of the stroke.

Note

This parameter type includes "Double" in its name in order to maintain parity with the name of its equivalent XAML element in the source XAML markup. The name of this XAML element is generated by the Microsoft Expression Blend 2 IDE. However, in Silverlight for Windows Embedded, this object represents a float instead of a double.

You can also define this float collection in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

.NET Framework Equivalent

System.Windows.Shapes.Shape.StrokeDashArray

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRShape
IXRShape::GetStrokeDashArray