API Reference
PowerPointTextBox
Represents a textbox shape.
Inheritance
- PowerPointShape
- PowerPointTextBox
Methods
public PowerPointParagraph AddBullet(String text) #PowerPointParagraphAdds a new bulleted paragraph to the textbox.
Parameters
- text System.String
public IReadOnlyList<PowerPointParagraph> AddBullets(IEnumerable<String> bullets, Int32 level = 0, Char bulletChar = '•', Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Adds a bulleted list to the textbox.
Parameters
- bullets System.Collections.Generic.IEnumerable{System.String}
- level System.Int32 = 0
- bulletChar System.Char = '•'
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public PowerPointParagraph AddNumberedItem(String text, TextAutoNumberSchemeValues style, Int32 startAt = 1) #PowerPointParagraphAdds a numbered item to the textbox.
Parameters
- text System.String
- style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues
- startAt System.Int32 = 1
public PowerPointParagraph AddNumberedItem(String text, Int32 startAt = 1) #PowerPointParagraphAdds a numbered item to the textbox using the default numbering style.
Parameters
- text System.String
- startAt System.Int32 = 1
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<String> items, TextAutoNumberSchemeValues style, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Adds a numbered list to the textbox.
Parameters
- items System.Collections.Generic.IEnumerable{System.String}
- style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues
- startAt System.Int32 = 1
- level System.Int32 = 0
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<String> items, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Adds a numbered list to the textbox using the default numbering style.
Parameters
- items System.Collections.Generic.IEnumerable{System.String}
- startAt System.Int32 = 1
- level System.Int32 = 0
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public PowerPointParagraph AddParagraph(String text = "", Action<PowerPointParagraph> configure = null, Action<PowerPointTextRun> run = null) #PowerPointParagraphAdds a paragraph to the textbox.
Parameters
- text System.String = ""
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
- run System.Action{OfficeIMO.PowerPoint.PowerPointTextRun} = null
public IReadOnlyList<PowerPointParagraph> AddParagraphs(IEnumerable<String> paragraphs, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Adds multiple paragraphs to the textbox.
Parameters
- paragraphs System.Collections.Generic.IEnumerable{System.String}
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public PowerPointTextBox ApplyAutoSpacing(Double lineSpacingMultiplier = 1.2, Nullable<Double> spaceBeforePoints = null, Nullable<Double> spaceAfterPoints = null) #PowerPointTextBoxApplies automatic spacing defaults to the textbox paragraphs.
Parameters
- lineSpacingMultiplier System.Double = 1.2
- spaceBeforePoints System.Nullable{System.Double} = null
- spaceAfterPoints System.Nullable{System.Double} = null
public PowerPointTextBox ApplyParagraphStyle(PowerPointParagraphStyle style) #PowerPointTextBoxApplies a paragraph style to the textbox.
Parameters
- style OfficeIMO.PowerPoint.PowerPointParagraphStyle
public PowerPointTextBox ApplyTextStyle(PowerPointTextStyle style, Boolean applyToRuns = false) #PowerPointTextBoxApplies a text style to the textbox.
Parameters
- style OfficeIMO.PowerPoint.PowerPointTextStyle
- applyToRuns System.Boolean = false
public Int32 ReplaceText(String oldValue, String newValue) #Int32Replaces text within the textbox while preserving run formatting.
Parameters
- oldValue System.String
- newValue System.String
public IReadOnlyList<PowerPointParagraph> SetBullets(IEnumerable<String> bullets, Int32 level = 0, Char bulletChar = '•', Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Replaces all paragraphs with a bulleted list.
Parameters
- bullets System.Collections.Generic.IEnumerable{System.String}
- level System.Int32 = 0
- bulletChar System.Char = '•'
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<String> items, TextAutoNumberSchemeValues style, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Replaces all paragraphs with a numbered list.
Parameters
- items System.Collections.Generic.IEnumerable{System.String}
- style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues
- startAt System.Int32 = 1
- level System.Int32 = 0
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<String> items, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Replaces all paragraphs with a numbered list using the default numbering style.
Parameters
- items System.Collections.Generic.IEnumerable{System.String}
- startAt System.Int32 = 1
- level System.Int32 = 0
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public IReadOnlyList<PowerPointParagraph> SetParagraphs(IEnumerable<String> paragraphs, Action<PowerPointParagraph> configure = null) #IReadOnlyList<PowerPointParagraph>Replaces all paragraphs with the provided content.
Parameters
- paragraphs System.Collections.Generic.IEnumerable{System.String}
- configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null
public PowerPointTextBox SetTextAutoFit(PowerPointTextAutoFit fit, Nullable<PowerPointTextAutoFitOptions> options = null) #PowerPointTextBoxSets the auto-fit mode and optional Normal auto-fit options.
Parameters
- fit OfficeIMO.PowerPoint.PowerPointTextAutoFit
- options System.Nullable{OfficeIMO.PowerPoint.PowerPointTextAutoFitOptions} = null
public PowerPointTextBox SetTextMarginsCm(Double leftCm, Double topCm, Double rightCm, Double bottomCm) #PowerPointTextBoxSets all text margins in centimeters.
Parameters
- leftCm System.Double
- topCm System.Double
- rightCm System.Double
- bottomCm System.Double
public PowerPointTextBox SetTextMarginsInches(Double leftInches, Double topInches, Double rightInches, Double bottomInches) #PowerPointTextBoxSets all text margins in inches.
Parameters
- leftInches System.Double
- topInches System.Double
- rightInches System.Double
- bottomInches System.Double
public PowerPointTextBox SetTextMarginsPoints(Double left, Double top, Double right, Double bottom) #PowerPointTextBoxSets all text margins in points.
Parameters
- left System.Double
- top System.Double
- right System.Double
- bottom System.Double
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
public Void MoveBy(Int64 offsetX, Int64 offsetY) #VoidParameters
- offsetX Int64
- offsetY Int64
public Void MoveByCm(Double offsetXCm, Double offsetYCm) #VoidParameters
- offsetXCm Double
- offsetYCm Double
public Void MoveByInches(Double offsetXInches, Double offsetYInches) #VoidParameters
- offsetXInches Double
- offsetYInches Double
public Void MoveByPoints(Double offsetXPoints, Double offsetYPoints) #VoidParameters
- offsetXPoints Double
- offsetYPoints Double
public Void Resize(Int64 width, Int64 height, PowerPointShapeAnchor anchor = TopLeft) #VoidParameters
- width Int64
- height Int64
- anchor PowerPointShapeAnchor = TopLeft
public Void ResizeCm(Double widthCm, Double heightCm, PowerPointShapeAnchor anchor = TopLeft) #VoidParameters
- widthCm Double
- heightCm Double
- anchor PowerPointShapeAnchor = TopLeft
public Void ResizeInches(Double widthInches, Double heightInches, PowerPointShapeAnchor anchor = TopLeft) #VoidParameters
- widthInches Double
- heightInches Double
- anchor PowerPointShapeAnchor = TopLeft
public Void ResizePoints(Double widthPoints, Double heightPoints, PowerPointShapeAnchor anchor = TopLeft) #VoidParameters
- widthPoints Double
- heightPoints Double
- anchor PowerPointShapeAnchor = TopLeft
public Void Scale(Double scaleX, Double scaleY, PowerPointShapeAnchor anchor = Center) #VoidParameters
- scale Double
- anchor PowerPointShapeAnchor = Center
public Void SetBlur(Double radiusPoints, Boolean grow = false) #VoidParameters
- radiusPoints Double
- grow Boolean = false
public Void SetGlow(String color, Double radiusPoints = 4, Int32 transparencyPercent = 30) #VoidParameters
- color String
- radiusPoints Double = 4
- transparencyPercent Int32 = 30
public Void SetLineEnds(Nullable<LineEndValues> startType, Nullable<LineEndValues> endType, Nullable<LineEndWidthValues> width = null, Nullable<LineEndLengthValues> length = null) #VoidParameters
- startType Nullable<LineEndValues>
- endType Nullable<LineEndValues>
- width Nullable<LineEndWidthValues> = null
- length Nullable<LineEndLengthValues> = null
public Void SetPositionCm(Double leftCm, Double topCm) #VoidParameters
- leftCm Double
- topCm Double
public Void SetPositionInches(Double leftInches, Double topInches) #VoidParameters
- leftInches Double
- topInches Double
public Void SetPositionPoints(Double leftPoints, Double topPoints) #VoidParameters
- leftPoints Double
- topPoints Double
public Void SetReflection(Double blurPoints = 4, Double distancePoints = 2, Double directionDegrees = 270, Double fadeDirectionDegrees = 90, Int32 startOpacityPercent = 50, Int32 endOpacityPercent = 0, Int32 startPositionPercent = 0, Int32 endPositionPercent = 100, Nullable<RectangleAlignmentValues> alignment = null, Boolean rotateWithShape = false) #VoidParameters
- blurPoints Double = 4
- distancePoints Double = 2
- directionDegrees Double = 270
- fadeDirectionDegrees Double = 90
- startOpacityPercent Int32 = 50
- endOpacityPercent Int32 = 0
- startPositionPercent Int32 = 0
- endPositionPercent Int32 = 100
- alignment Nullable<RectangleAlignmentValues> = null
- rotateWithShape Boolean = false
public Void SetShadow(String color, Double blurPoints = 4, Double distancePoints = 3, Double angleDegrees = 45, Int32 transparencyPercent = 35, Boolean rotateWithShape = false) #VoidParameters
- color String
- blurPoints Double = 4
- distancePoints Double = 3
- angleDegrees Double = 45
- transparencyPercent Int32 = 35
- rotateWithShape Boolean = false
public Void SetSizeCm(Double widthCm, Double heightCm) #VoidParameters
- widthCm Double
- heightCm Double
public Void SetSizeInches(Double widthInches, Double heightInches) #VoidParameters
- widthInches Double
- heightInches Double
public Void SetSizePoints(Double widthPoints, Double heightPoints) #VoidParameters
- widthPoints Double
- heightPoints Double
public Void SetSoftEdges(Double radiusPoints) #VoidParameters
- radiusPoints Double
Properties
public IReadOnlyList<PowerPointParagraph> Paragraphs { get; } #Paragraphs contained in the textbox.
public String Text { get; set; } #Text contained in the textbox.
public Boolean IsPlaceholder { get; } #Returns true if the textbox is tied to a slide placeholder.
public Nullable<PlaceholderValues> PlaceholderType { get; set; } #Gets or sets the placeholder type for this textbox.
public Nullable<UInt32> PlaceholderIndex { get; set; } #Gets or sets the placeholder index for this textbox.
public Nullable<Double> TextMarginLeftPoints { get; set; } #Gets or sets the left text margin in points.
public Nullable<Double> TextMarginRightPoints { get; set; } #Gets or sets the right text margin in points.
public Nullable<Double> TextMarginTopPoints { get; set; } #Gets or sets the top text margin in points.
public Nullable<Double> TextMarginBottomPoints { get; set; } #Gets or sets the bottom text margin in points.
public Nullable<Double> TextMarginLeftCm { get; set; } #Gets or sets the left text margin in centimeters.
public Nullable<Double> TextMarginRightCm { get; set; } #Gets or sets the right text margin in centimeters.
public Nullable<Double> TextMarginTopCm { get; set; } #Gets or sets the top text margin in centimeters.
public Nullable<Double> TextMarginBottomCm { get; set; } #Gets or sets the bottom text margin in centimeters.
public Nullable<Double> TextMarginLeftInches { get; set; } #Gets or sets the left text margin in inches.
public Nullable<Double> TextMarginRightInches { get; set; } #Gets or sets the right text margin in inches.
public Nullable<Double> TextMarginTopInches { get; set; } #Gets or sets the top text margin in inches.
public Nullable<Double> TextMarginBottomInches { get; set; } #Gets or sets the bottom text margin in inches.
public Nullable<TextAnchoringTypeValues> TextVerticalAlignment { get; set; } #Gets or sets the vertical anchoring of text inside the textbox.
public Nullable<TextVerticalValues> TextDirection { get; set; } #Gets or sets the text direction (horizontal/vertical).
public Nullable<PowerPointTextAutoFit> TextAutoFit { get; set; } #Gets or sets the text auto-fit behavior.
public Nullable<PowerPointTextAutoFitOptions> TextAutoFitOptions { get; set; } #Gets or sets detailed auto-fit options (only applies to Normal auto-fit).
public Boolean Bold { get; set; } #Gets or sets a value indicating whether the text is bold.
public Boolean Italic { get; set; } #Gets or sets a value indicating whether the text is italic.
public Nullable<Int32> FontSize { get; set; } #Gets or sets the font size in points.
public String FontName { get; set; } #Gets or sets the font name.
public String Color { get; set; } #Gets or sets the text color in hexadecimal format (e.g. "FF0000").
Inherited Properties
public String Name { get; } #public String FillColor { get; set; } #public Int64 Left { get; set; } #public Double LeftPoints { get; set; } #public Double LeftCm { get; set; } #public Double LeftInches { get; set; } #public Int64 Top { get; set; } #public Double TopPoints { get; set; } #public Double TopCm { get; set; } #public Double TopInches { get; set; } #public Int64 Width { get; set; } #public Double WidthPoints { get; set; } #public Double WidthCm { get; set; } #public Double WidthInches { get; set; } #public Int64 Height { get; set; } #public Double HeightPoints { get; set; } #public Double HeightCm { get; set; } #public Double HeightInches { get; set; } #public Int64 Right { get; set; } #public Double RightPoints { get; set; } #public Double RightCm { get; set; } #public Double RightInches { get; set; } #public Int64 Bottom { get; set; } #public Double BottomPoints { get; set; } #public Double BottomCm { get; set; } #public Double BottomInches { get; set; } #public Int64 CenterX { get; set; } #public Double CenterXPoints { get; set; } #public Double CenterXCm { get; set; } #public Double CenterXInches { get; set; } #public Int64 CenterY { get; set; } #public Double CenterYPoints { get; set; } #public Double CenterYCm { get; set; } #public Double CenterYInches { get; set; } #public PowerPointLayoutBox Bounds { get; set; } #public String OutlineColor { get; set; } #public Nullable<Double> OutlineWidthPoints { get; set; } #public Nullable<PresetLineDashValues> OutlineDash { get; set; } #public Nullable<Int32> FillTransparency { get; set; } #public Nullable<Double> Rotation { get; set; } #public Nullable<Boolean> HorizontalFlip { get; set; } #public Nullable<Boolean> VerticalFlip { get; set; } #