OfficeIMO

API Reference

Class

PowerPointParagraph

Namespace OfficeIMO.PowerPoint
Assembly OfficeIMO.PowerPoint

Represents a paragraph within a textbox.

Inheritance

  • Object
  • PowerPointParagraph

Methods

public PowerPointParagraph AddFormattedText(String text, Boolean bold = false, Boolean italic = false, Nullable<TextUnderlineValues> underline = null) #
Returns: PowerPointParagraph

Adds formatted text to the paragraph and returns the paragraph for chaining.

Parameters

text System.String requiredposition: 0
bold System.Boolean = false optionalposition: 1
italic System.Boolean = false optionalposition: 2
underline System.Nullable{DocumentFormat.OpenXml.Drawing.TextUnderlineValues} = null optionalposition: 3
public PowerPointTextRun AddRun(String text, Action<PowerPointTextRun> configure = null) #
Returns: PowerPointTextRun

Adds a run to the paragraph.

Parameters

text System.String requiredposition: 0
configure System.Action{OfficeIMO.PowerPoint.PowerPointTextRun} = null optionalposition: 1
public PowerPointParagraph AddText(String text, Action<PowerPointTextRun> configure = null) #
Returns: PowerPointParagraph

Adds a run to the paragraph and returns the paragraph for chaining.

Parameters

text System.String requiredposition: 0
configure System.Action{OfficeIMO.PowerPoint.PowerPointTextRun} = null optionalposition: 1
public Void ClearBullet() #
Returns: Void

Clears any bullet/numbering from the paragraph.

public Int32 ReplaceText(String oldValue, String newValue) #
Returns: Int32

Replaces text within the paragraph runs while preserving formatting.

Parameters

oldValue System.String requiredposition: 0
newValue System.String requiredposition: 1
public PowerPointParagraph SetAlignment(TextAlignmentTypeValues alignment) #
Returns: PowerPointParagraph

Sets paragraph alignment and returns the paragraph for chaining.

Parameters

alignment DocumentFormat.OpenXml.Drawing.TextAlignmentTypeValues requiredposition: 0
public PowerPointParagraph SetBold(Boolean isBold = true) #
Returns: PowerPointParagraph

Sets the current run bold property and returns the paragraph for chaining.

Parameters

isBold System.Boolean = true optionalposition: 0
public Void SetBullet(Char bulletChar = '•') #
Returns: Void

Applies a character bullet to the paragraph.

Parameters

bulletChar System.Char = '•' optionalposition: 0
public PowerPointParagraph SetBulletFont(String fontName) #
Returns: PowerPointParagraph

Sets the bullet font and returns the paragraph for chaining.

Parameters

fontName System.String requiredposition: 0
public PowerPointParagraph SetBulletSizePercent(Int32 percent) #
Returns: PowerPointParagraph

Sets the bullet size in percent (100 = 100%) and returns the paragraph for chaining.

Parameters

percent System.Int32 requiredposition: 0
public PowerPointParagraph SetBulletSizePoints(Int32 sizePoints) #
Returns: PowerPointParagraph

Sets the bullet size in points and returns the paragraph for chaining.

Parameters

sizePoints System.Int32 requiredposition: 0
public PowerPointParagraph SetColor(String color) #
Returns: PowerPointParagraph

Sets the current run color and returns the paragraph for chaining.

Parameters

color System.String requiredposition: 0
public PowerPointParagraph SetFontName(String fontName) #
Returns: PowerPointParagraph

Sets the current run font name and returns the paragraph for chaining.

Parameters

fontName System.String requiredposition: 0
public PowerPointParagraph SetFontSize(Int32 size) #
Returns: PowerPointParagraph

Sets the current run font size in points and returns the paragraph for chaining.

Parameters

size System.Int32 requiredposition: 0
public PowerPointParagraph SetHangingCm(Double centimeters) #
Returns: PowerPointParagraph

Sets a hanging indent in centimeters and returns the paragraph for chaining.

Parameters

centimeters System.Double requiredposition: 0
public PowerPointParagraph SetHangingInches(Double inches) #
Returns: PowerPointParagraph

Sets a hanging indent in inches and returns the paragraph for chaining.

Parameters

inches System.Double requiredposition: 0
public PowerPointParagraph SetHangingPoints(Double points) #
Returns: PowerPointParagraph

Sets a hanging indent in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
public PowerPointParagraph SetHighlightColor(String color) #
Returns: PowerPointParagraph

Sets the current run highlight color and returns the paragraph for chaining.

Parameters

color System.String requiredposition: 0
public PowerPointParagraph SetIndentCm(Double centimeters) #
Returns: PowerPointParagraph

Sets indentation in centimeters and returns the paragraph for chaining.

Parameters

centimeters System.Double requiredposition: 0
public PowerPointParagraph SetIndentInches(Double inches) #
Returns: PowerPointParagraph

Sets indentation in inches and returns the paragraph for chaining.

Parameters

inches System.Double requiredposition: 0
public PowerPointParagraph SetIndentPoints(Double points) #
Returns: PowerPointParagraph

Sets indentation in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
public PowerPointParagraph SetItalic(Boolean isItalic = true) #
Returns: PowerPointParagraph

Sets the current run italic property and returns the paragraph for chaining.

Parameters

isItalic System.Boolean = true optionalposition: 0
public PowerPointParagraph SetLeftMarginCm(Double centimeters) #
Returns: PowerPointParagraph

Sets left margin in centimeters and returns the paragraph for chaining.

Parameters

centimeters System.Double requiredposition: 0
public PowerPointParagraph SetLeftMarginInches(Double inches) #
Returns: PowerPointParagraph

Sets left margin in inches and returns the paragraph for chaining.

Parameters

inches System.Double requiredposition: 0
public PowerPointParagraph SetLeftMarginPoints(Double points) #
Returns: PowerPointParagraph

Sets left margin in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
public PowerPointParagraph SetLevel(Int32 level) #
Returns: PowerPointParagraph

Sets the bullet/list level and returns the paragraph for chaining.

Parameters

level System.Int32 requiredposition: 0
public PowerPointParagraph SetLineSpacingMultiplier(Double multiplier) #
Returns: PowerPointParagraph

Sets line spacing as a multiplier (1.0 = 100%) and returns the paragraph for chaining.

Parameters

multiplier System.Double requiredposition: 0
public PowerPointParagraph SetLineSpacingPoints(Double points) #
Returns: PowerPointParagraph

Sets line spacing in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
SetNumbered 3 overloads
public Void SetNumbered(TextAutoNumberSchemeValues style, Int32 startAt = 1) #
Returns: Void

Applies an auto-numbered bullet to the paragraph.

Parameters

style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues requiredposition: 0
startAt System.Int32 = 1 optionalposition: 1
public Void SetNumbered(TextAutoNumberSchemeValues style) #
Returns: Void

Applies an auto-numbered bullet to the paragraph without resetting the start value.

Parameters

arg1 DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues requiredposition: 0
public Void SetNumbered(Int32 startAt = 1) #
Returns: Void

Applies a default auto-numbered bullet (Arabic period) to the paragraph.

Parameters

startAt System.Int32 = 1 optionalposition: 0
public PowerPointParagraph SetSpaceAfterPoints(Double points) #
Returns: PowerPointParagraph

Sets space after the paragraph in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
public PowerPointParagraph SetSpaceBeforePoints(Double points) #
Returns: PowerPointParagraph

Sets space before the paragraph in points and returns the paragraph for chaining.

Parameters

points System.Double requiredposition: 0
public PowerPointParagraph SetText(String text) #
Returns: PowerPointParagraph

Sets the paragraph text and returns the paragraph for chaining.

Parameters

text System.String requiredposition: 0
public PowerPointParagraph SetUnderline(Boolean underline = true) #
Returns: PowerPointParagraph

Sets the current run underline property and returns the paragraph for chaining.

Parameters

underline System.Boolean = true optionalposition: 0

Properties

public String Text { get; set; } #

Text content of the paragraph.

public IReadOnlyList<PowerPointTextRun> Runs { get; } #

Runs within the paragraph.

public Nullable<TextAlignmentTypeValues> Alignment { get; set; } #

Gets or sets paragraph alignment.

public Nullable<Int32> Level { get; set; } #

Gets or sets the bullet/list level (0-8).

public Nullable<Double> IndentPoints { get; set; } #

Gets or sets paragraph indentation in points.

public Nullable<Double> LeftMarginPoints { get; set; } #

Gets or sets paragraph left margin in points.

public Nullable<Double> LineSpacingPoints { get; set; } #

Gets or sets line spacing in points.

public Nullable<Double> LineSpacingMultiplier { get; set; } #

Gets or sets line spacing as a multiplier (1.0 = 100%).

public Nullable<Double> SpaceBeforePoints { get; set; } #

Gets or sets space before the paragraph in points.

public Nullable<Double> SpaceAfterPoints { get; set; } #

Gets or sets space after the paragraph in points.

public String BulletFontName { get; set; } #

Gets or sets the bullet font name.

public Nullable<Int32> BulletSizePoints { get; set; } #

Gets or sets the bullet size in points.

public Nullable<Int32> BulletSizePercent { get; set; } #

Gets or sets the bullet size in percent (100 = 100%).