Lock Class
Locking Setting.When the object is serialized out as xml, its qualified name is w:lock.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.Lock
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Декларация
Public Class Lock _
Inherits OpenXmlLeafElement
'Применение
Dim instance As Lock
public class Lock : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 редакция 1]
17.5.2.23 lock (Locking Setting)
This element specifies the set of behaviors which shall be applied to the contents of the parent structured document tag when the contents of this documents are edited by an application (whether through a user interface or directly). The type of locking applied to the structured document tag is specified via the value of the associated val attribute.
If this element is omitted, then the locking settings implied for the structured document tag shall be as follows:
If the structured document tag specifies that it is a group via the group element (§17.5.2.17), then the contents of the structured document tag shall be editable, but the entire tag can be deleted.
For all other kinds, no locking settings shall be applied to the structured document tag.
[Example: Consider the following plain text structured document tag:
<w:sdt>
<w:sdtPr>
<w:lock w:val="sdtLocked"/>
…
<w:text/>
</w:sdtPr>
…
</w:sdt>
This plain text structured document tag's properties contain a lock element, specifying locking behaviors for the structured document tag. Since the locking val attribute value is sdtLocked, this locking setting must specify that the contents of the structured document tag can be edited, but the structured document tag itself must not be deleted from the document. end example]
Parent Elements |
---|
sdtPr (§17.5.2.38) |
Attributes |
Description |
---|---|
val (Locking Type) |
Specifies the type of locking which shall be applied to the parent structured document tag. If this attribute is omitted, this its value shall be assumed to be unlocked (using the defaults stated above). [Example: Consider the following plain text structured document tag properties:
The val attribute value is contentLocked, therefore this locking setting shall specify that the contents of the structured document tag must not be edited, but the structured document tag itself can be deleted from the document. end example] The possible values for this attribute are defined by the ST_Lock simple type (§17.18.49). |
[Note: The W3C XML Schema definition of this element's content model (CT_Lock) is located in §A.1. end note]
© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.
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.