Поделиться через


SdtContentText Class

Plain Text Structured Document Tag.When the object is serialized out as xml, its qualified name is w:text.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.SdtContentText

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

Syntax

'Декларация
Public Class SdtContentText _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As SdtContentText
public class SdtContentText : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

17.5.2.44 text (Plain Text Structured Document Tag)

This element specifies that the parent structured document tag shall be a plain text box when displayed in the document.

This setting specifies that the behavior for this structured document tag shall be as follows:

  • Formatting applied to any part of this structured document tag's contents shall apply to its entire contents

As well, the structured document tag shall satisfy the following restraints or the document shall be considered non-conformant:

  • The contents shall only be contain a single run (one set of formatting properties) with exceptions for soft carriage returns via the multiLine attribute on this element

  • The contents shall not contain more than a single paragraph or table cell and shall not contain a table row or table

[Example: Consider the following structured document tag:

<w:sdt>
<w:sdtPr>
…
<w:text/>
</w:sdtPr>
…
</w:sdt>

The text element in this structured document tag's properties specify that the kind of structured document tag is a plain text box. end example]

Parent Elements

sdtPr (§17.5.2.38)

Attributes

Description

multiLine (Allow Soft Line Breaks)

Specifies whether soft line breaks can be added to the contents of this structured document tag when this document is modified. This setting shall not affect the ability of the structured document tag to display existing soft line breaks (which shall be preserved) and shall only affect the ability to add line breaks when the document is modified by an application.

If this attribute is omitted, then the parent plain text structured document control shall not allow soft line breaks to be added to its contents.

[Example: Consider the following structured document tag:

<w:sdt>
<w:sdtPr>
…
<w:text w:multiLine="true"/>
</w:sdtPr>
…
</w:sdt>

The multiLine attribute on the text element in this structured document tag's properties specify that an application can allow soft line breaks to be added to the run contents of the structured document tag. end example]

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

[Note: The W3C XML Schema definition of this element's content model (CT_SdtText) 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.

See Also

Reference

SdtContentText Members

DocumentFormat.OpenXml.Wordprocessing Namespace