[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.ContentObject

ContentObject Class

Namespace: GrapeCity.Documents.Word
Assembly: DS.Documents.Word.dll
Syntax
public class ContentObject
Public Class ContentObject

Properties

Name Description
Children

Gets the collection of the children of this content object.

Document

Gets the DocumentBase that contains this content object.

End

Gets the Marker representing the end of this content object in the parent body.

Guid

Gets the content unique identifier.

OwnerSection

Gets the Section that owns this content object.

ParentBody

Gets the parent Body of this content object.

ParentContent

Gets the parent ContentObject of this content object.

Start

Gets the Marker representing the start of this content object in the parent body.

Methods

Name Description
CanAdd(Type)

Checks whether a ContentObject of the specified type can be added to the current object.

CanAdd(Type, out Exception)

Checks whether a ContentObject of the specified type can be added to the current object.

CanAddContentControl(ContentControlType)

Checks whether a ContentControl of the specified type can be added to the current object.

CanAddContentControl(ContentControlType, out Exception)

Checks whether a ContentControl of the specified type can be added to the current object.

Delete()

Deletes this content object from the parent Body.

Note that the position occupied by this content object in the parent can still be accessed (e.g. to insert new content) via a PersistentRange if one has previously been created with GetPersistentRange().

GetChildren<T>()

Gets the collection of this content object's children of a specified type.

GetPersistentRange()

Creates and returns a PersistentRange associated with this content object.

Unlike the Range returned by GetRange(), this persistent range and any markers on it (see Start and End) can still be used if the object is deleted.

Note that PersistentRange should be disposed when no longer needed to improve performance.

GetRange()

Creates and returns a Range associated with this content object.

To get a range that can be used after the object has been deleted, see GetPersistentRange().

ToString()

Gets string representation of the content.