Class Document
Represents a DLS document.
Inheritance
System.Object
Document
Implements
System.Xml.Serialization.IXmlSerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Syncfusion.DLS.Base.dll
Syntax
public class Document : WidgetContainer, IXDLSSerializable, IDocument, IEntityBase, IXmlSerializable, IWidgetContainer, IWidget
Constructors
Document()
Creates document instance.
Declaration
Document(IDocument)
Make deep copy data from specified document.
Declaration
protected Document(IDocument doc)
Parameters
Document(Boolean)
Initializes a new instance of the Document class.
Declaration
public Document(bool ensureMinimal)
Parameters
Type |
Name |
Description |
System.Boolean |
ensureMinimal |
if set to true [ensure minimal].
|
Fields
DEF_BULLETS_STYLE
Declaration
protected const string DEF_BULLETS_STYLE = "Bulleted"
Field Value
DEF_NUMBERING_STYLE
Declaration
protected const string DEF_NUMBERING_STYLE = "Numbered"
Field Value
m_listStyles
Collection of list styles
Declaration
protected ListStyleCollection m_listStyles
Field Value
m_sections
Collection of document sections
Declaration
protected ISectionCollection m_sections
Field Value
m_styles
Collection of document styles
Declaration
protected IStyleCollection m_styles
Field Value
Properties
BackgroundImage
Gets / sets image that represents background the image of a document.
Declaration
public Image BackgroundImage { get; set; }
Property Value
Type |
System.Drawing.Image |
Bookmarks
Declaration
public BookmarkCollection Bookmarks { get; }
Property Value
LastParagraph
Gets last paragraph of last section.
Declaration
public IParagraph LastParagraph { get; }
Property Value
LastSection
Gets last section of the document.
Declaration
public ISection LastSection { get; }
Property Value
ListStyles
Gets document list styles.
Declaration
public ListStyleCollection ListStyles { get; }
Property Value
Sections
Declaration
public ISectionCollection Sections { get; }
Property Value
Styles
Declaration
public IStyleCollection Styles { get; }
Property Value
TextBoxCollection
Get/set textbox items of main document
Declaration
public TextBoxCollection TextBoxCollection { get; set; }
Property Value
Declaration
protected override ICollectionBase WidgetCollection { get; }
Property Value
Overrides
Methods
AddListStyle(ListType, String)
Adds new list style to document.
Declaration
public ListStyle AddListStyle(ListType listType, string styleName)
Parameters
Type |
Name |
Description |
ListType |
listType |
List type
|
System.String |
styleName |
Paragraph style name
|
Returns
AddParagraphStyle(String)
Adds new paragraph style to the document.
Declaration
public IParagraphStyle AddParagraphStyle(string styleName)
Parameters
Type |
Name |
Description |
System.String |
styleName |
Paragraph style name
|
Returns
AddSection()
Adds new section to document.
Declaration
public ISection AddSection()
Returns
AddStyle(StyleType, String)
Adds new style to document.
Declaration
public IStyle AddStyle(StyleType styleType, string styleName)
Parameters
Type |
Name |
Description |
StyleType |
styleType |
Style type
|
System.String |
styleName |
Style name
|
Returns
Clone()
Declaration
Returns
CloneImpl()
Declaration
protected virtual IDocument CloneImpl()
Returns
Implementation of cell format creating
Declaration
protected virtual CellFormat CreateCellFormatImpl()
Returns
Implementation of character foprmat creating
Declaration
protected virtual CharacterFormat CreateCharacterFormatImpl()
Returns
CreateColumnCollectionImpl(ISection)
Implementation of section collection creating
Declaration
protected virtual ColumnCollection CreateColumnCollectionImpl(ISection owner)
Parameters
Returns
CreateColumnImpl()
Implementation of style creation.
Declaration
protected virtual Column CreateColumnImpl()
Returns
Declaration
protected virtual HeadersFooters CreateHeadersFootersImpl()
Returns
CreateLayoutInfo()
Creates and initializes layouting data
Declaration
protected override void CreateLayoutInfo()
Overrides
Declaration
protected virtual ListFormat CreateListFormatImpl(IParagraph owner)
Parameters
Returns
CreateListLevelImpl(ListStyle)
Declaration
protected virtual ListLevel CreateListLevelImpl(ListStyle style)
Parameters
Returns
CreateListStyleImpl()
Declaration
protected virtual ListStyle CreateListStyleImpl()
Returns
CreatePageSetupImpl()
Declaration
protected virtual PageSetup CreatePageSetupImpl()
Returns
CreateParagraph()
Creates new pargraph instance.
Declaration
public IParagraph CreateParagraph()
Returns
CreateParagraphCollectionImpl()
Implementation of paragraph collection creating
Declaration
protected virtual IParagraphCollection CreateParagraphCollectionImpl()
Returns
CreateParagraphCollectionImpl(IEntityBase)
Implementation of paragraph collection creating
Declaration
protected virtual IParagraphCollection CreateParagraphCollectionImpl(IEntityBase owner)
Parameters
Returns
Implementation of paragraph foprmat creating
Declaration
protected virtual ParagraphFormat CreateParagraphFormatImpl()
Returns
CreateParagraphImpl()
Implementation of paragraph creation.
Declaration
protected virtual IParagraph CreateParagraphImpl()
Returns
CreateParagraphItem(ParagraphItemType)
Creates new paragraph item instance.
Declaration
public IParagraphItem CreateParagraphItem(ParagraphItemType itemType)
Parameters
Returns
CreateParagraphItem(Object)
Creates new paragraph item instance.
Declaration
protected virtual IParagraphItem CreateParagraphItem(object itemType)
Parameters
Type |
Name |
Description |
System.Object |
itemType |
Paragraph item type
|
Returns
CreateParagraphItemCollectionImpl(IParagraph)
Creates the paragraph item collection.
Declaration
protected virtual IParagraphItemCollection CreateParagraphItemCollectionImpl(IParagraph owner)
Parameters
Returns
CreateParagraphItemImpl(ParagraphItemType)
Implementation of paragraph item creating
Declaration
protected virtual IParagraphItem CreateParagraphItemImpl(ParagraphItemType itemType)
Parameters
Returns
CreateSectionCollectionImpl()
Implementation of section collection creating
Declaration
protected virtual ISectionCollection CreateSectionCollectionImpl()
Returns
CreateSectionImpl()
Implementation of section creating
Declaration
protected virtual ISection CreateSectionImpl()
Returns
CreateShape(ShapeType, Canvas)
Creates new shape instance.
Declaration
public Shape CreateShape(ShapeType shapeType, Canvas canvas)
Parameters
Returns
Implementation of shape format creating
Declaration
protected virtual ShapeFormat CreateShapeFormatImpl()
Returns
CreateShapeImpl(ShapeType, Canvas)
Implementation of shape creating
Declaration
protected virtual Shape CreateShapeImpl(ShapeType shapeType, Canvas canvas)
Parameters
Returns
CreateStyleCollectionImpl()
Implementation of style collection creating
Declaration
protected virtual IStyleCollection CreateStyleCollectionImpl()
Returns
CreateStyleImpl(StyleType)
Implementation of style creating
Declaration
protected virtual IStyle CreateStyleImpl(StyleType styleType)
Parameters
Returns
Creates the tab collection impl.
Declaration
protected virtual TabCollection CreateTabCollectionImpl(ParagraphFormat paragraph)
Parameters
Returns
CreateTableCellCollectionImpl(TableRow)
Declaration
protected virtual CellCollection CreateTableCellCollectionImpl(TableRow row)
Parameters
Returns
CreateTableCellImpl(TableRow)
Declaration
protected virtual TableCell CreateTableCellImpl(TableRow row)
Parameters
Returns
CreateTableColumnCollectionImpl(Table)
Declaration
protected virtual TableColumnCollection CreateTableColumnCollectionImpl(Table table)
Parameters
Type |
Name |
Description |
Table |
table |
|
Returns
CreateTableColumnImpl(ITable)
Declaration
protected virtual TableColumn CreateTableColumnImpl(ITable table)
Parameters
Type |
Name |
Description |
ITable |
table |
|
Returns
Implementation of table format creating
Declaration
protected virtual TableFormat CreateTableFormatImpl()
Returns
CreateTableRowCollectionImpl(Table)
Declaration
protected virtual RowCollection CreateTableRowCollectionImpl(Table table)
Parameters
Type |
Name |
Description |
Table |
table |
|
Returns
CreateTableRowImpl(Table)
Declaration
protected virtual TableRow CreateTableRowImpl(Table table)
Parameters
Type |
Name |
Description |
Table |
table |
|
Returns
CreateTextBodyImpl()
Implementation of character foprmat creating
Declaration
protected virtual TextBody CreateTextBodyImpl()
Returns
CreateTextBoxCollectionImpl()
Declaration
protected virtual TextBoxCollection CreateTextBoxCollectionImpl()
Returns
CreateTextboxFormatImpl()
Implementation of textbox format creating
Declaration
protected virtual TextBoxFormat CreateTextboxFormatImpl()
Returns
EnsureListStyles()
Create default liststyles and add them to ListStyleCollection
Declaration
protected void EnsureListStyles()
EnsureMinimal()
Adds one section and one paragraph to the document.
Declaration
public void EnsureMinimal()
EnsureParagraphStyle(IParagraph)
Declaration
protected void EnsureParagraphStyle(IParagraph paragraph)
Parameters
Find(String, Boolean, Boolean)
Returns first entry of given string, taking into consideration caseSensitive
and wholeWord options.
Declaration
public TextRangesHolder Find(string given, bool caseSensitive, bool wholeWord)
Parameters
Type |
Name |
Description |
System.String |
given |
|
System.Boolean |
caseSensitive |
|
System.Boolean |
wholeWord |
|
Returns
Find(Regex)
Returns first entry of given regex.
Declaration
public TextRangesHolder Find(Regex pattern)
Parameters
Type |
Name |
Description |
System.Text.RegularExpressions.Regex |
pattern |
|
Returns
FindAll(String, Boolean, Boolean)
Returns all entries of given string, taking into consideration caseSensitive
and wholeWord options.
Declaration
public TextRangesHolder[] FindAll(string given, bool caseSensitive, bool wholeWord)
Parameters
Type |
Name |
Description |
System.String |
given |
|
System.Boolean |
caseSensitive |
|
System.Boolean |
wholeWord |
|
Returns
FindAll(Regex)
Returns all entries of given regex.
Declaration
public TextRangesHolder[] FindAll(Regex pattern)
Parameters
Type |
Name |
Description |
System.Text.RegularExpressions.Regex |
pattern |
|
Returns
GetBackGndImage()
Declaration
protected virtual Image GetBackGndImage()
Returns
Type |
System.Drawing.Image |
GetSchema()
Declaration
protected virtual XmlSchema GetSchema()
Returns
Type |
System.Xml.Schema.XmlSchema |
GetText()
Gets the document's text.
Declaration
Returns
ImportContent(IDocument)
Declaration
public void ImportContent(IDocument doc)
Parameters
ImportSection(ISection)
Imports section into document.
Declaration
public void ImportSection(ISection section)
Parameters
InitXDLSHolder()
Adds serializable elements to XDLS holder.
Declaration
protected override void InitXDLSHolder()
Overrides
OnSetBackgroundImage()
Declaration
protected virtual void OnSetBackgroundImage()
OpenXml(Stream)
Opens the XML document from stream.
Declaration
public void OpenXml(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
The stream object
|
OpenXml(String)
Opens the document from xml format file.
Declaration
public void OpenXml(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
The name of file
|
Replaces all entries of given string with TextRangesHolder, taking into
consideration caseSensitive and wholeWord options.
Declaration
public void Replace(string given, TextRangesHolder textRangesHolder, bool caseSensitive, bool wholeWord)
Parameters
Type |
Name |
Description |
System.String |
given |
|
TextRangesHolder |
textRangesHolder |
|
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
public 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
Replaces all entries of given regular expression with TextRangesHolder.
Declaration
public void Replace(Regex pattern, TextRangesHolder textRangesHolder)
Parameters
Type |
Name |
Description |
System.Text.RegularExpressions.Regex |
pattern |
|
TextRangesHolder |
textRangesHolder |
|
Replace(Regex, String)
Replaces all entries of given regular expression with replace string.
Declaration
public int Replace(Regex pattern, string replace)
Parameters
Type |
Name |
Description |
System.Text.RegularExpressions.Regex |
pattern |
|
System.String |
replace |
|
Returns
SaveTxt(Stream)
Saves the document in text format.
Declaration
public void SaveTxt(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
The name of target file
|
SaveTxt(String)
Saves the document in text format.
Declaration
public void SaveTxt(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
The name of target file
|
SaveXml(Stream)
Saves the document in xml format.
Declaration
public void SaveXml(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
The target stream
|
SaveXml(String)
Saves the document in xml format.
Declaration
public void SaveXml(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
The name of target file
|
Implements
System.Xml.Serialization.IXmlSerializable