Class
RtfShape
OfficeIMO.Rtf
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
- Method RtfDocument.AddShape
- Method RtfParagraph.AddShape
Constructors
public RtfShape() #Methods
public RtfShapeInstruction AddInstruction(string name, int? parameter = null, bool hasParameter = true) #Adds a raw shape instruction control.
Parameters
- name string
- parameter int? = null
- hasParameter bool = true
Returns
RtfShapeInstructionpublic RtfShapeProperty AddProperty(string name, string? value = null) #Adds a named shape property.
Parameters
- name string
- value string? = null
Returns
RtfShapePropertypublic RtfParagraph AddTextBoxParagraph(string? text = null) #Adds a paragraph to the shape text box.
Parameters
- text string? = null
Returns
RtfParagraphpublic string ToPlainText() #Returns text-box content with paragraphs separated by new lines.
Returns
stringInherited Methods
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.