Partager via


TextStyles Class

Slide Master Text Styles.When the object is serialized out as xml, its qualified name is p:txStyles.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Presentation.TextStyles

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(TitleStyle))> _
<ChildElementInfoAttribute(GetType(OtherStyle))> _
<ChildElementInfoAttribute(GetType(BodyStyle))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class TextStyles _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TextStyles
[ChildElementInfoAttribute(typeof(TitleStyle))]
[ChildElementInfoAttribute(typeof(OtherStyle))]
[ChildElementInfoAttribute(typeof(BodyStyle))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class TextStyles : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TitleStyle <p:titleStyle>

  • BodyStyle <p:bodyStyle>

  • OtherStyle <p:otherStyle>

  • ExtensionList <p:extLst>

[ISO/IEC 29500-1 1st Edition]

19.3.1.52 txStyles (Slide Master Text Styles)

This element specifies the text styles within a slide master. Within this element is the styling information for title text, the body text and other slide text as well. This element is only for use within the Slide Master and thus sets the text styles for the corresponding presentation slides.

[Example: Consider the case where we would like to specify the title text for a master slide.

<p:txStyles>
  <p:titleStyle>
    <a:lvl1pPr algn="ctr" rtl="0" latinLnBrk="0">
      <a:spcBef>
        <a:spcPct val="0"/>
      </a:spcBef>
      <a:buNone/>
      <a:defRPr sz="4400" kern="1200">
        <a:solidFill>
          <a:schemeClr val="tx1"/>
        </a:solidFill>
        <a:latin typeface="+mj-lt"/>
        <a:ea typeface="+mj-ea"/>
        <a:cs typeface="+mj-cs"/>
      </a:defRPr>
    </a:lvl1pPr>
  </p:titleStyle>
</p:txStyles>

In the above example the title text is set according to the above formatting for all related slides within the presentation. end example]

Parent Elements

sldMaster (§19.3.1.42)

Child Elements

Subclause

bodyStyle (Slide Master Body Text Style)

§19.3.1.5

extLst (Extension List)

§19.2.1.12

otherStyle (Slide Master Other Text Style)

§19.3.1.35

titleStyle (Slide Master Title Text Style)

§19.3.1.49

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

TextStyles Members

DocumentFormat.OpenXml.Presentation Namespace