Partager via


Lock Class

Defines the Lock Class.When the object is serialized out as xml, its qualified name is o:lock.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Vml.Office.Lock

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

14.2.2.18 lock (Shape Protections)

This element specifies locks against actions that can be effected in the UI of an authoring application or programmatically through an object model.

[Example: The following snippet locks the shape's aspect ratio and text from user edits.

<v:shape … >
  <o:lock v:ext="edit" aspectratio="t" text="t"/>
</v:shape>

end example]

Parent Elements

arc (§14.1.2.1); background (Part 1, §17.2.1); curve (§14.1.2.3); group (§14.1.2.7); hdrShapeDefaults (§9.7.2.1); image (§14.1.2.10); line (§14.1.2.12); object (Part 1, §17.3.3.19); oval (§14.1.2.13); pict (§9.2.2.2); pict (§9.5.1); polyline (§14.1.2.15); rect (§14.1.2.16); roundrect (§14.1.2.17); shape (§14.1.2.19); shapeDefaults (§9.7.2.2); shapedefaults (§14.2.2.28); shapetype (§14.1.2.20)

Attributes

Description

adjusthandles (Handles Lock)

Specifies whether the handles of a shape are locked from being edited. Default is false.

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

aspectratio (Aspect Ratio Lock)

Specifies whether the aspect ratio of a shape is locked from being edited. Default is false.

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

cropping (Cropping Lock)

Specifies whether cropping of a shape is locked from being edited. Default is false.

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

ext (VML Extension Handling Behavior)

Namespace: urn:schemas-microsoft-com:vml

Specifies an optional value that indicates how applications that implement VML should interpret extensions not defined as part of the original specification of core VML.

[Rationale: This part of the original VML specification is included to assist applications that leverage existing VML support in implementing the Office Open XML Format. end rationale]

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

grouping (Grouping Lock)

Specifies whether a shape is locked from being grouped. Default is false.

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

position (Position Lock)

Specifies whether the position of a shape is locked from being edited. Default is false.

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

rotation (Rotation Lock)

Specifies whether the rotation of a shape is locked from being edited. Default is false.

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

selection (Selection Lock)

Specifies whether the shape is locked from being selectable in an editor. Default is false.

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

shapetype (AutoShape Type Lock)

Specifies whether the AutoShape type is locked from being edited. Default is false. If true, the type of an AutoShape cannot be changed in a graphical editor.

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

text (Text Lock)

Specifies whether the text attached to a shape is locked from being edited. Default is false.

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

ungrouping (Ungrouping Lock)

Specifies whether a grouped shape is locked from being ungrouped. Default is false.

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

verticies (Vertices Lock)

Specifies whether the vertices of a path are locked from being edited. Default is false.

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

[Note: The W3C XML Schema definition of this element’s content model (CT_Lock) is located in §A.6.2. 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

Lock Members

DocumentFormat.OpenXml.Vml.Office Namespace