Class TextBodyItem
Represents the base implementation for paragraphs and tables.
Inheritance
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.UWP.dll
Syntax
public abstract class TextBodyItem : WidgetBase, IXDLSSerializable, IWidget, ITextBodyItem, IEntity
Constructors
TextBodyItem(WordDocument)
Initializes a new instance of the TextBodyItem class with the specified WordDocument.
Declaration
public TextBodyItem(WordDocument doc)
Parameters
| Type | Name | Description |
|---|---|---|
| WordDocument | doc | The WordDocument instance. |
Properties
IsDeleteRevision
Gets a value indicating whether this item was deleted from the document, when "Track Changes" is or was set to "true".
Declaration
public bool IsDeleteRevision { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if this instance is delete revision; otherwise, |
IsInsertRevision
Gets a value indicating whether this item was inserted to the document, when "Track Changes" is or was set to "true".
Declaration
public bool IsInsertRevision { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if this instance was inserted; otherwise, |
OwnerTextBody
Gets the owner text body of the current TextBodyItem.
Declaration
public WTextBody OwnerTextBody { get; }
Property Value
| Type | Description |
|---|---|
| WTextBody | The WTextBody instance that is the owner of the current item. |
Methods
Find(Regex)
Finds the text based on the specified regular expression.
Declaration
public abstract TextSelection Find(Regex pattern)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | The System.Text.RegularExpressions.Regex used to find the text. |
Returns
| Type | Description |
|---|---|
| TextSelection | The selection of text inside a paragraph along with formattings. |
GetNextInSection(WSection)
Gets the next text body item.
Declaration
protected TextBodyItem GetNextInSection(WSection section)
Parameters
| Type | Name | Description |
|---|---|---|
| WSection | section | The WSection instance from which the next item to be found. |
Returns
| Type | Description |
|---|---|
| TextBodyItem | The next TextBodyItem object. |
Replace(String, String, Boolean, Boolean)
Replaces all entries of given string with replace string, taking into consideration case sensitive and whole word options.
Declaration
public abstract int Replace(string given, string replace, bool caseSensitive, bool wholeWord)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | given | The string represents the text to be found. |
| System.String | replace | The string specifies the text to replace. |
| System.Boolean | caseSensitive | True to consider the case; otherwise, false. |
| System.Boolean | wholeWord | True to consider the text as whole word; otherwise, false. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The integer that represents the count of the replacements made. |
Replace(Regex, TextSelection)
Replaces the specified regular expression with a TextSelection.
Declaration
public abstract int Replace(Regex pattern, TextSelection textSelection)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | The System.Text.RegularExpressions.Regex used to find the text. |
| TextSelection | textSelection | The TextSelection which specifies the text to replace. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The integer that represents the count of the replacements made. |
Replace(Regex, TextSelection, Boolean)
Replaces the specified regular expression with a TextSelection along with its formatting.
Declaration
public abstract int Replace(Regex pattern, TextSelection textSelection, bool saveFormatting)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | The System.Text.RegularExpressions.Regex used to find the text. |
| TextSelection | textSelection | The TextSelection which specifies the text to replace. |
| System.Boolean | saveFormatting | True if save with source formatting; otherwise, false. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The integer that represents the count of the replacements made. |
Replace(Regex, String)
Replaces all entries of given regular expression with the specified string.
Declaration
public abstract int Replace(Regex pattern, string replace)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | The System.Text.RegularExpressions.Regex used to find the text. |
| System.String | replace | The string specifies the text to replace. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The integer that represents the count of the replacements made. |