Compartilhar via


ClickAndTypeStyle Class

Paragraph Style Applied to Automatically Generated Paragraphs.When the object is serialized out as xml, its qualified name is w:clickAndTypeStyle.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.String253Type
        DocumentFormat.OpenXml.Wordprocessing.ClickAndTypeStyle

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

Syntax

'Declaration
Public Class ClickAndTypeStyle _
    Inherits String253Type
'Usage
Dim instance As ClickAndTypeStyle
public class ClickAndTypeStyle : String253Type

Remarks

[ISO/IEC 29500-1 1st Edition]

17.15.1.19 clickAndTypeStyle (Paragraph Style Applied to Automatically Generated Paragraphs)

This element specifies the paragraph style, specified using the style element, which shall be applied to paragraphs which are automatically created when text is inserted into a WordprocessingML document in an area of the document that has no other style associated with it. This style is referenced via the val attribute, which stores the style ID of the style (stored in the styleId attribute on the style definition).

[Guidance: Consider a WordprocessingML document opened in an application that allows users to place their cursor anywhere within the document editing canvas and enter text. The clickAndTypeStyle element should be used to specify the paragraph style to be associated with the paragraph of text entered after a user places their cursor somewhere in the blank document that results in the generation of new paragraphs. end guidance]

If this element is omitted, then the default paragraph style (the paragraph style whose default attribute is set to true), shall be used for automatically generated paragraphs. If the style whose styleId is specified using the val attribute is not a paragraph style or does not exist in the document, then the default paragraph style shall be used instead.

[Example: Consider a WordprocessingML document that has specified that paragraphs which are automatically created when text is inserted in a given area of the document which has no other style associated with it must be associated with the paragraph style that has a styleId equal to BalloonText.

This is accomplished by specifying a clickAndTypeStyle element with a val attribute equal to the value of the ID of the desired style. This constraint would be specified using the following WordprocessingML:

<w:clickAndTypeStyle w:val="BalloonText" />

The corresponding style in the styles part would be defined as follows:

<w:style w:type="paragraph" w:styleId="BalloonText">
…
</w:style>

The clickAndTypeStyle element specifies the use of the paragraph style with the style ID of BalloonText. end example]

Parent Elements

settings (§17.15.1.78)

Attributes

Description

val (String Value)

Specifies that its contents contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  …
</w:sdtPr>

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

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

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

ClickAndTypeStyle Members

DocumentFormat.OpenXml.Wordprocessing Namespace