Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeThemeTextStyle

OfficeIMO

Namespace
OfficeIMO
Assembly
OfficeIMO.Core
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Text colours, line spacing and heading treatment shared by document formats.

Inheritance

  • object
  • OfficeThemeTextStyle

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 2

Constructors

public OfficeThemeTextStyle(double lineSpacing, OfficeColor titleColor, OfficeColor subtitleColor, OfficeColor headingColor, OfficeColor linkColor, bool headingBold, OfficeThemeRule titleRule, OfficeThemeParagraphSpacing titleSpacing, OfficeThemeParagraphSpacing heading1Spacing, OfficeThemeParagraphSpacing heading2Spacing, OfficeThemeParagraphSpacing heading3Spacing) #

Creates immutable text colours, line spacing and heading treatment.

Parameters

lineSpacing double required
titleColor OfficeIMO.OfficeColor required
subtitleColor OfficeIMO.OfficeColor required
headingColor OfficeIMO.OfficeColor required
linkColor OfficeIMO.OfficeColor required
headingBold bool required
titleRule OfficeIMO.OfficeThemeRule required
titleSpacing OfficeIMO.OfficeThemeParagraphSpacing required
heading1Spacing OfficeIMO.OfficeThemeParagraphSpacing required
heading2Spacing OfficeIMO.OfficeThemeParagraphSpacing required
heading3Spacing OfficeIMO.OfficeThemeParagraphSpacing required

Methods

public OfficeThemeParagraphSpacing GetHeadingSpacing(int level) #

Gets the spacing for a heading level: 0 is the title, 1 to 6 are heading levels; levels 4 to 6 share level 3 spacing.

Parameters

level int required
public OfficeThemeTextStyle With(double? lineSpacing = null, OfficeColor? titleColor = null, OfficeColor? subtitleColor = null, OfficeColor? headingColor = null, OfficeColor? linkColor = null, bool? headingBold = null, OfficeThemeRule? titleRule = null, OfficeThemeParagraphSpacing? titleSpacing = null, OfficeThemeParagraphSpacing? heading1Spacing = null, OfficeThemeParagraphSpacing? heading2Spacing = null, OfficeThemeParagraphSpacing? heading3Spacing = null) #

Returns a copy with the supplied replacements; omitted values are retained.

Parameters

lineSpacing double? = null optional
titleColor OfficeIMO.OfficeColor? = null optional
subtitleColor OfficeIMO.OfficeColor? = null optional
headingColor OfficeIMO.OfficeColor? = null optional
linkColor OfficeIMO.OfficeColor? = null optional
headingBold bool? = null optional
titleRule OfficeIMO.OfficeThemeRule? = null optional
titleSpacing OfficeIMO.OfficeThemeParagraphSpacing? = null optional
heading1Spacing OfficeIMO.OfficeThemeParagraphSpacing? = null optional
heading2Spacing OfficeIMO.OfficeThemeParagraphSpacing? = null optional
heading3Spacing OfficeIMO.OfficeThemeParagraphSpacing? = null optional

Properties

public double LineSpacing { get; } #

Gets the line spacing multiple for body text (1.0 is single spacing).

public OfficeColor TitleColor { get; } #

Gets the title colour.

public OfficeColor SubtitleColor { get; } #

Gets the subtitle colour.

public OfficeColor HeadingColor { get; } #

Gets the colour of heading levels 1 to 6.

public OfficeColor LinkColor { get; } #

Gets the hyperlink colour.

public bool HeadingBold { get; } #

Gets whether headings are bold.

public OfficeThemeRule TitleRule { get; } #

Gets the rule drawn under the title, or OfficeThemeRule.None.

public OfficeThemeParagraphSpacing TitleSpacing { get; } #

Gets the space before and after the title.

public OfficeThemeParagraphSpacing Heading1Spacing { get; } #

Gets the space before and after level 1 headings.

public OfficeThemeParagraphSpacing Heading2Spacing { get; } #

Gets the space before and after level 2 headings.

public OfficeThemeParagraphSpacing Heading3Spacing { get; } #

Gets the space before and after level 3 to 6 headings.