Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfShape

OfficeIMO.Rtf

Namespace
OfficeIMO.Rtf
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Implements
IRtfCloneable IRtfInline IRtfBlock
Modifiers
sealed

Dependency-free representation of an RTF drawing shape, including raw instructions, named properties, and optional text-box content.

Inheritance

  • object
  • RtfShape

Usage

Explore 2 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

Constructors

public RtfShape() #

Methods

public RtfShapeInstruction AddInstruction(string name, int? parameter = null, bool hasParameter = true) #

Adds a raw shape instruction control.

Parameters

name string required
parameter int? = null optional
hasParameter bool = true optional
public RtfShapeProperty AddProperty(string name, string? value = null) #

Adds a named shape property.

Parameters

name string required
value string? = null optional
public RtfParagraph AddTextBoxParagraph(string? text = null) #

Adds a paragraph to the shape text box.

Parameters

text string? = null optional
public string ToPlainText() #

Returns text-box content with paragraphs separated by new lines.

Returns

string

Properties

public IReadOnlyList<RtfShapeInstruction> Instructions { get; } #

Raw shape instruction controls from \shpinst.

public IReadOnlyList<RtfShapeProperty> Properties { get; } #

Named shape properties from \sp groups.

public IReadOnlyList<RtfParagraph> TextBoxParagraphs { get; } #

Paragraphs contained by the shape text box destination.