OfficeIMO

API Reference

Struct

PowerPointTextStyle

Namespace OfficeIMO.PowerPoint
Assembly OfficeIMO.PowerPoint
Base ValueType
Modifiers sealed

Defines text formatting that can be applied to runs or paragraphs.

Inheritance

  • ValueType
  • PowerPointTextStyle

Constructors

public PowerPointTextStyle(Nullable<Int32> fontSize = null, String fontName = null, String color = null, Nullable<Boolean> bold = null, Nullable<Boolean> italic = null, Nullable<Boolean> underline = null, String highlightColor = null) #

Creates a new text style instance.

Parameters

fontSize System.Nullable{System.Int32} = null optionalposition: 0
fontName System.String = null optionalposition: 1
color System.String = null optionalposition: 2
bold System.Nullable{System.Boolean} = null optionalposition: 3
italic System.Nullable{System.Boolean} = null optionalposition: 4
underline System.Nullable{System.Boolean} = null optionalposition: 5
highlightColor System.String = null optionalposition: 6

Methods

Apply 2 overloads
public Void Apply(PowerPointParagraph paragraph) #
Returns: Void

Applies the style to a text run.

Parameters

run OfficeIMO.PowerPoint.PowerPointTextRun requiredposition: 0
Apply(OfficeIMO.PowerPoint.PowerPointParagraph paragraph) #

Applies the style to a paragraph's default run.

Parameters

paragraph OfficeIMO.PowerPoint.PowerPointParagraph required
public PowerPointTextStyle WithBold(Nullable<Boolean> bold) #
Returns: PowerPointTextStyle

Returns a copy with bold formatting updated.

Parameters

bold System.Nullable{System.Boolean} requiredposition: 0
public PowerPointTextStyle WithColor(String color) #
Returns: PowerPointTextStyle

Returns a copy with a new color.

Parameters

color System.String requiredposition: 0
public PowerPointTextStyle WithFontName(String fontName) #
Returns: PowerPointTextStyle

Returns a copy with a new font name.

Parameters

fontName System.String requiredposition: 0
public PowerPointTextStyle WithFontSize(Nullable<Int32> fontSize) #
Returns: PowerPointTextStyle

Returns a copy with a new font size.

Parameters

fontSize System.Nullable{System.Int32} requiredposition: 0
public PowerPointTextStyle WithHighlightColor(String highlightColor) #
Returns: PowerPointTextStyle

Returns a copy with a new highlight color.

Parameters

highlightColor System.String requiredposition: 0
public PowerPointTextStyle WithItalic(Nullable<Boolean> italic) #
Returns: PowerPointTextStyle

Returns a copy with italic formatting updated.

Parameters

italic System.Nullable{System.Boolean} requiredposition: 0
public PowerPointTextStyle WithUnderline(Nullable<Boolean> underline) #
Returns: PowerPointTextStyle

Returns a copy with underline formatting updated.

Parameters

underline System.Nullable{System.Boolean} requiredposition: 0

Properties

public Nullable<Int32> FontSize { get; } #

Font size in points.

public String FontName { get; } #

Font name (Latin).

public String Color { get; } #

Text color in hex (e.g. "1F4E79").

public Nullable<Boolean> Bold { get; } #

Bold formatting.

public Nullable<Boolean> Italic { get; } #

Italic formatting.

public Nullable<Boolean> Underline { get; } #

Underline formatting.

public String HighlightColor { get; } #

Highlight color in hex (e.g. "FFF59D").

public static PowerPointTextStyle Title { get; } #

A preset for typical slide titles.

public static PowerPointTextStyle Subtitle { get; } #

A preset for subtitles.

public static PowerPointTextStyle Body { get; } #

A preset for body text.

public static PowerPointTextStyle Caption { get; } #

A preset for captions or footnotes.

public static PowerPointTextStyle Emphasis { get; } #

A preset that enables bold emphasis.