Compartir a través de


ShapeHandle Class

Shape Handle.When the object is serialized out as xml, its qualified name is v:h.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Vml.ShapeHandle

Namespace:  DocumentFormat.OpenXml.Vml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class ShapeHandle _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As ShapeHandle
public class ShapeHandle : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

14.1.2.8 h (Shape Handle)

This element defines a single handle, which is a user interface element tied to one or two adj values. Moving the handle changes its linked adj values, which in turn changes formulas and attributes that depend on them. The handle is optionally constrained vertically or horizontally. The linked adj values store the position of the handle in the shape's coordinate space.

[Example: The example below defines a simple kite shape with a resizable width:

<v:shape coordsize="200,200" coordorigin="-100,-100" adj="100" style="width:50;height:50;position:relative"
 path="m @1,-50 l 0,-200 @0,-50 0,200 x e">
 <v:formulas>
  <v:f eqn="val #0"/>
  <v:f eqn="sum 0 0 @0"/>
 </v:formulas>
 <v:handles>
  <v:h position="#0,0"/>
 </v:handles>
</v:shape>

end example]

Parent Elements

handles (§14.1.2.9)

Attributes

Description

invx (Invert Handle's X Position)

Specifies whether the x position of the handle should be inverted according to:

Default is false.

[Example:

<v:handles>
  <v:h … invx="true" … />
</v:handles>

end example]

The possible values for this attribute are defined by the ST_TrueFalse simple type (§15.1.2.5).

invy (Invert Handle's Y Position)

Specifies whether the y position of the handle should be inverted according to:

Default is false.

[Example:

<v:handles>
  <v:h … invy="true" … />
</v:handles>

end example]

The possible values for this attribute are defined by the ST_TrueFalse simple type (§15.1.2.5).

map (Handle Coordinate Mapping)

Specifies how the x and y positions of the handle are mapped from the coordsize range into the specified range. Default is "0,1000".

[Example:

<v:handles>
  <v:h … map="-1000,1000" … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

polar (Handle Polar Center)

Specifies the center position of a handle that uses polar coordinates. If specified, the position attribute is assumed to contain radius and angle values. If omitted, the position attribute is assumed to contain x and y positions. Default is no value.

[Example:

<v:handles>
  <v:h … polar="0,0" … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

position (Handle Position)

Specifies the x and y position of the handle. If the polar attribute is present, defines the handle position using radius and angle values. Default is "0,0".

Each value in the vector is one of the following:

  • constant

  • formula (e.g., @2)

  • adj value (e.g., #2)

  • center

  • topleft

  • bottomright

Each of the above except for an adj value reference fixes the handle position for that dimension. Specifying an adj value allows the handle to move in that dimension and the handle position for that dimension is stored in the adj value.

[Example:The handle's x position is fixed but it is free to move in the y dimension:

<v:handles>
  <v:h … position="topleft,#2" … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

radiusrange (Handle Polar Radius Range)

Specifies a range of minimum and maximum values that constrain the radius of a handle using polar coordinates. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

[Example:The polar handle can only be moved within a radius range of 25 to 50.

<v:handles>
  <v:h … radiusrange="25,50" … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

switch (Handle Inversion Toggle)

Specifies whether the x and y dimensions of the handle are switched when the shape is taller than it is wide. Default is false. This is useful for shapes with limo stretch behavior.

[Example:

<v:handles>
  <v:h … switch="true" … />
</v:handles>

end example]

The possible values for this attribute are defined by the ST_TrueFalseBlank simple type (§15.1.2.6).

xrange (Handle X Position Range)

Specifies a range of minimum and maximum values that constrain the x position of a handle. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

[Example: The handle's x position has a maximum bound of 500 and no minimum bound:

<v:handles>
  <v:h … xrange=",500" … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

yrange (Handle Y Position Range)

Specifies a range of minimum and maximum values that constrain the y position of a handle. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

[Example: The handle's y position has a minimum bound of -500 and no maximum bound:

<v:handles>
  <v:h … yrange="-500," … />
</v:handles>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_H) is located in §A.6.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ShapeHandle Members

DocumentFormat.OpenXml.Vml Namespace