Interface IDocument
Interface publishes functionality of one document
Namespace: Syncfusion.DLS
Assembly: Syncfusion.DLS.Base.dll
Syntax
public interface IDocument : IEntityBase
Properties
BackgroundImage
Gets / sets image that represents background image of a document.
Declaration
Image BackgroundImage { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Image |
Bookmarks
Gets collection of bookmarks of the document
Declaration
BookmarkCollection Bookmarks { get; }
Property Value
| Type |
|---|
| BookmarkCollection |
LastParagraph
Gets last paragraph in last section object
Declaration
IParagraph LastParagraph { get; }
Property Value
| Type |
|---|
| IParagraph |
LastSection
Gets last section object.
Declaration
ISection LastSection { get; }
Property Value
| Type |
|---|
| ISection |
ListStyles
Gets collection of list styles.
Declaration
ListStyleCollection ListStyles { get; }
Property Value
| Type |
|---|
| ListStyleCollection |
Sections
Gets collection of sections of this document.
Declaration
ISectionCollection Sections { get; }
Property Value
| Type |
|---|
| ISectionCollection |
Styles
Gets collection of styles.
Declaration
IStyleCollection Styles { get; }
Property Value
| Type |
|---|
| IStyleCollection |
TextBoxCollection
Get/set document textboxes
Declaration
TextBoxCollection TextBoxCollection { get; set; }
Property Value
| Type |
|---|
| TextBoxCollection |
Methods
AddListStyle(ListType, String)
Adds new paragraph style to document.
Declaration
ListStyle AddListStyle(ListType listType, string styleName)
Parameters
| Type | Name | Description |
|---|---|---|
| ListType | listType | List Type |
| System.String | styleName | Paragraph style name |
Returns
| Type |
|---|
| ListStyle |
AddParagraphStyle(String)
Adds new paragraph style to document.
Declaration
IParagraphStyle AddParagraphStyle(string styleName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | styleName | Paragraph style name |
Returns
| Type |
|---|
| IParagraphStyle |
AddSection()
Adds new section to document.
Declaration
ISection AddSection()
Returns
| Type |
|---|
| ISection |
AddStyle(StyleType, String)
Adds new style to document.
Declaration
IStyle AddStyle(StyleType styleType, string styleName)
Parameters
| Type | Name | Description |
|---|---|---|
| StyleType | styleType | Style type |
| System.String | styleName | Style name |
Returns
| Type |
|---|
| IStyle |
Clone()
Makes deep copy of document.
Declaration
IDocument Clone()
Returns
| Type |
|---|
| IDocument |
CreateParagraph()
Creates new pargraph instance.
Declaration
IParagraph CreateParagraph()
Returns
| Type |
|---|
| IParagraph |
CreateParagraphItem(ParagraphItemType)
Creates new paragraph item instance.
Declaration
IParagraphItem CreateParagraphItem(ParagraphItemType itemType)
Parameters
| Type | Name | Description |
|---|---|---|
| ParagraphItemType | itemType | Paragraph item type |
Returns
| Type |
|---|
| IParagraphItem |
CreateShape(ShapeType, Canvas)
Creates new shape instance.
Declaration
Shape CreateShape(ShapeType shapeType, Canvas canvas)
Parameters
| Type | Name | Description |
|---|---|---|
| ShapeType | shapeType | |
| Canvas | canvas |
Returns
| Type |
|---|
| Shape |
EnsureMinimal()
If the document contains no sections, creates one section with one paragraph.
Declaration
void EnsureMinimal()
Find(String, Boolean, Boolean)
Finds and returns entry of specified string along with formatting, taking into consideration caseSensitive and wholeWord options.
Declaration
TextRangesHolder Find(string given, bool caseSensitive, bool wholeWord)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | given | |
| System.Boolean | caseSensitive | |
| System.Boolean | wholeWord |
Returns
| Type |
|---|
| TextRangesHolder |
Find(Regex)
Finds and returns entry of specified regular expression along with formatting.
Declaration
TextRangesHolder Find(Regex pattern)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern |
Returns
| Type |
|---|
| TextRangesHolder |
FindAll(String, Boolean, Boolean)
Finds and returns all entries of specified string along with formatting, taking into consideration caseSensitive and wholeWord options.
Declaration
TextRangesHolder[] FindAll(string given, bool caseSensitive, bool wholeWord)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | given | |
| System.Boolean | caseSensitive | |
| System.Boolean | wholeWord |
Returns
| Type |
|---|
| TextRangesHolder[] |
FindAll(Regex)
Finds and returns all entries of specified regular expression along with formatting.
Declaration
TextRangesHolder[] FindAll(Regex pattern)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern |
Returns
| Type |
|---|
| TextRangesHolder[] |
GetText()
Gets the document's text.
Declaration
string GetText()
Returns
| Type |
|---|
| System.String |
OpenXml(Stream)
Open document from xml format file.
Declaration
void OpenXml(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The stream object |
OpenXml(String)
Open document from xml format file.
Declaration
void OpenXml(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | The name of file |
Replace(String, TextRangesHolder, Boolean, Boolean)
Replaces all entries of given string with TextRangesHolder, taking into consideration caseSensitive and wholeWord options.
Declaration
void Replace(string given, TextRangesHolder rangesHolder, bool caseSensitive, bool wholeWord)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | given | |
| TextRangesHolder | rangesHolder | |
| System.Boolean | caseSensitive | |
| System.Boolean | wholeWord |
Replace(String, String, Boolean, Boolean)
Replaces all entries of given string with replace string, taking into consideration caseSensitive and wholeWord options.
Declaration
int Replace(string given, string replace, bool caseSensitive, bool wholeWord)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | given | |
| System.String | replace | |
| System.Boolean | caseSensitive | |
| System.Boolean | wholeWord |
Returns
| Type |
|---|
| System.Int32 |
Replace(Regex, TextRangesHolder)
Replaces all entries of given regular expression with TextRangesHolder.
Declaration
void Replace(Regex pattern, TextRangesHolder rangesHolder)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | |
| TextRangesHolder | rangesHolder |
Replace(Regex, String)
Replaces all occurrences of a character pattern specified by a regular expression with replace string.
Declaration
int Replace(Regex pattern, string replace)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.RegularExpressions.Regex | pattern | |
| System.String | replace |
Returns
| Type |
|---|
| System.Int32 |
SaveXml(Stream)
Save document in xml format.
Declaration
void SaveXml(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The stream object |
SaveXml(String)
Save document in xml format.
Declaration
void SaveXml(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | The name of target file |