次の方法で共有


CarriageReturn Class

Carriage Return.When the object is serialized out as xml, its qualified name is w:cr.

Inheritance Hierarchy

System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.EmptyType
DocumentFormat.OpenXml.Wordprocessing.CarriageReturn

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

Syntax

'宣言
Public Class CarriageReturn _
    Inherits EmptyType
'使用
Dim instance As CarriageReturn
public class CarriageReturn : EmptyType

Remarks

[ISO/IEC 29500-1 初版]

17.3.3.4 cr (Carriage Return)

This element specifies that a carriage return shall be placed at the current location in the run content. A carriage return is the equivalent of Unicode character 000D, and is used to end the current line of text in WordprocessingML.

The behavior of a carriage return in run content shall be identical to a break character with null type and clear attributes, which shall end the current line and find the next available line on which to continue.

[Example: Consider the following sentence in a WordprocessingML document:

This is another simple sentence.

Normally, just as shown above, this sentence would be displayed on a single line as it is not long enough to require line breaking (given the width of the current page). However, if a carriage return were inserted after the word another, as follows:

<w:r>
<w:t>This is another</w:t>
<w:cr/>
<w:t xml:space="preserve"> simple sentence.</w:t>
</w:r>

This would imply that this carriage return character must force a line break, and break the line after that word:

This is another
simple sentence.

The carriage return character forced the following text to be restarted on the next available line in the document. end example]

Parent Elements

r (§22.1.2.87); r (§17.3.2.25)

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

CarriageReturn Members

DocumentFormat.OpenXml.Wordprocessing Namespace