Class
RadDocument

Represents the document object in RadRichTextBox.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class RadDocument : DocumentElement, ISupportInitialize, INotifyPropertyChanged

Inheritance: objectDocumentElementRadDocument

Implements: INotifyPropertyChangedISupportInitialize

Inherited Members DocumentElement.GetStyleProperty(IStylePropertyDefinition)DocumentElement.GetStyleProperty(string)DocumentElement.EnumerateChildrenOfType<T>()DocumentElement.GetParentOfType<T>()DocumentElement.CreateLayoutBox()DocumentElement.CopyPropertiesFrom(DocumentElement)DocumentElement.CopyPropertiesFromStyle(StyleDefinition)DocumentElement.ExtractStyleFromProperties()DocumentElement.ExtractStyleFromLocalProperties()DocumentElement.InvalidateAssociatedBoxesArrange()DocumentElement.InvalidateAssociatedBoxesMeasure()DocumentElement.InvalidateAssociatedBoxesLayout()DocumentElement.GetAssociatedLayoutBoxes()DocumentElement.GetRootDocument()DocumentElement.CreateShallowCopy()DocumentElement.GetPropertyValueSource(IStylePropertyDefinition)DocumentElement.ClearValue(IStylePropertyDefinition)DocumentElement.OnRemoved()DocumentElement.OnStyleChanging()DocumentElement.OnStylePropertyChanged(StylePropertyChangeEventArgs)DocumentElement.OnParentChanging()DocumentElement.OnParentChanged()DocumentElement.ChildIndexDocumentElement.HasStyleDocumentElement.StyleDocumentElement.StyleNameDocumentElement.TagDocumentElement.FirstLayoutBoxDocumentElement.IsFirstLayoutBoxInitializedDocumentElement.DocumentElementsDocumentElement.ParentDocumentElement.ChildrenDocumentElement.PreviousSiblingDocumentElement.NextSiblingDocumentElement.CursorDocumentElement.StyleChangingDocumentElement.StyleChangedDocumentElement.StylePropertyChangedDocumentElement.ParentChangingDocumentElement.ParentChangedDocumentElement.PropertyValueChanged

Constructors

RadDocument()

Initializes a new instance of the RadDocument class.

Declaration

cs-api-definition
public RadDocument()

Fields

DefaultTabWidthProperty

The default tab width style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, DocumentProperties> DefaultTabWidthProperty

Field Value

StylePropertyDefinition<double?, DocumentProperties>

EndnotesFirstNumberProperty

The endnotes first number style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?, DocumentProperties> EndnotesFirstNumberProperty

Field Value

StylePropertyDefinition<int?, DocumentProperties>

EndnotesNumberingFormatProperty

The endnotes numbering format style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ListNumberingFormat?, DocumentProperties> EndnotesNumberingFormatProperty

Field Value

StylePropertyDefinition<ListNumberingFormat?, DocumentProperties>

EndnotesNumberingRestartTypeProperty

The endnotes numbering restart type style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<NumberingRestartType?, DocumentProperties> EndnotesNumberingRestartTypeProperty

Field Value

StylePropertyDefinition<NumberingRestartType?, DocumentProperties>

EndnotesPositionProperty

The endnotes position style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<EndnotesPosition?, DocumentProperties> EndnotesPositionProperty

Field Value

StylePropertyDefinition<EndnotesPosition?, DocumentProperties>

FootnotesFirstNumberProperty

The footnotes first number style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?, DocumentProperties> FootnotesFirstNumberProperty

Field Value

StylePropertyDefinition<int?, DocumentProperties>

FootnotesNumberingFormatProperty

The footnotes numbering format style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ListNumberingFormat?, DocumentProperties> FootnotesNumberingFormatProperty

Field Value

StylePropertyDefinition<ListNumberingFormat?, DocumentProperties>

FootnotesNumberingRestartTypeProperty

The footnotes numbering restart type style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<NumberingRestartType?, DocumentProperties> FootnotesNumberingRestartTypeProperty

Field Value

StylePropertyDefinition<NumberingRestartType?, DocumentProperties>

FootnotesPositionProperty

The footnotes position style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<FootnotesPosition?, DocumentProperties> FootnotesPositionProperty

Field Value

StylePropertyDefinition<FootnotesPosition?, DocumentProperties>

MAX_DOCUMENT_SIZE

Represent the maximum document size.

Declaration

cs-api-definition
public static readonly SizeF MAX_DOCUMENT_SIZE

Field Value

SizeF

SectionDefaultPageMarginProperty

The section default page margin style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<Padding?, DocumentProperties> SectionDefaultPageMarginProperty

Field Value

StylePropertyDefinition<Padding?, DocumentProperties>

SectionDefaultPageOrientationProperty

The section default page orientation style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<PageOrientation?, DocumentProperties> SectionDefaultPageOrientationProperty

Field Value

StylePropertyDefinition<PageOrientation?, DocumentProperties>

SectionDefaultPageSizeProperty

The section default page size style property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<Size?, DocumentProperties> SectionDefaultPageSizeProperty

Field Value

StylePropertyDefinition<Size?, DocumentProperties>

Properties

BibliographicSources

Gets or sets a collection of BibliographicSource objects.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public NotifiableCollection<BibliographicSource> BibliographicSources { get; set; }

Property Value

NotifiableCollection<BibliographicSource>

BibliographicStyles

Gets or sets a dictionary keeping the styles used for the bibliographic references inside the document.

Declaration

cs-api-definition
public Dictionary<string, BibliographicReferenceStyleBase> BibliographicStyles { get; set; }

Property Value

Dictionary<string, BibliographicReferenceStyleBase>

CaptionDefinitions

Gets the caption definitions inside the document.

Declaration

cs-api-definition
public Dictionary<string, CaptionDefinition> CaptionDefinitions { get; }

Property Value

Dictionary<string, CaptionDefinition>

The caption definitions.

CaretPosition

Gets a DocumentPosition representing the current caret position.

Declaration

cs-api-definition
public DocumentPosition CaretPosition { get; }

Property Value

DocumentPosition

The current position of the caret.

CodeFormatter

Gets or sets the formatter used for code blocks.

Declaration

cs-api-definition
public CodeFormatter CodeFormatter { get; set; }

Property Value

CodeFormatter

The code formatter.

DefaultTabWidth

Gets or sets the default tab width.

Declaration

cs-api-definition
[XamlSerializable]
public double DefaultTabWidth { get; set; }

Property Value

double

DesiredSize

Gets a value representing the desired layout size of the document.

Declaration

cs-api-definition
public SizeF DesiredSize { get; }

Property Value

SizeF

A SizeF representing the desired size.

DocumentContentChangedInterval

Gets or sets a value determining how often to fire the DocumentContentChanged event.

Declaration

cs-api-definition
public TimeSpan DocumentContentChangedInterval { get; set; }

Property Value

TimeSpan

DocumentLayoutBox

Gets a value representing the layout box of the document.

Declaration

cs-api-definition
public DocumentLayoutBox DocumentLayoutBox { get; }

Property Value

DocumentLayoutBox

The DocumentLayoutBox.

DocumentVariables

Gets the document variables.

Declaration

cs-api-definition
public DocumentVariableCollection DocumentVariables { get; }

Property Value

DocumentVariableCollection

The document variables.

EndnotesFirstNumber

Gets or sets the endnotes starting number.

Declaration

cs-api-definition
[XamlSerializable(1)]
public int EndnotesFirstNumber { get; set; }

Property Value

int

EndnotesNumberingFormat

Gets or sets the endnotes numbering format.

Declaration

cs-api-definition
[XamlSerializable(ListNumberingFormat.LowerRoman)]
public ListNumberingFormat EndnotesNumberingFormat { get; set; }

Property Value

ListNumberingFormat

EndnotesNumberingRestartType

Gets or sets the type of the endnotes numbering restart.

Declaration

cs-api-definition
[XamlSerializable(NumberingRestartType.Continuous)]
public NumberingRestartType EndnotesNumberingRestartType { get; set; }

Property Value

NumberingRestartType

EndnotesPosition

Gets or sets the endnotes position.

Declaration

cs-api-definition
[XamlSerializable(EndnotesPosition.DocumentEnd)]
public EndnotesPosition EndnotesPosition { get; set; }

Property Value

EndnotesPosition

FieldsDisplayMode

Gets or sets the display mode for the fields in this document.

Declaration

cs-api-definition
public FieldDisplayMode FieldsDisplayMode { get; set; }

Property Value

FieldDisplayMode

The fields display mode.

FootnotesFirstNumber

Gets or sets the footnotes starting number.

Declaration

cs-api-definition
[XamlSerializable(1)]
public int FootnotesFirstNumber { get; set; }

Property Value

int

FootnotesNumberingFormat

Gets or sets the footnotes numbering format.

Declaration

cs-api-definition
[XamlSerializable(ListNumberingFormat.Decimal)]
public ListNumberingFormat FootnotesNumberingFormat { get; set; }

Property Value

ListNumberingFormat

FootnotesNumberingRestartType

Gets or sets the type of the footnotes numbering restart.

Declaration

cs-api-definition
[XamlSerializable(NumberingRestartType.Continuous)]
public NumberingRestartType FootnotesNumberingRestartType { get; set; }

Property Value

NumberingRestartType

FootnotesPosition

Gets or sets the footnotes position.

Declaration

cs-api-definition
[XamlSerializable(FootnotesPosition.PageBottom)]
public FootnotesPosition FootnotesPosition { get; set; }

Property Value

FootnotesPosition

HasDifferentEvenAndOddHeadersFooters

Gets or sets a value indicating whether headers and footers are different in even and odd pages.

Declaration

cs-api-definition
[XamlSerializable(false)]
public bool HasDifferentEvenAndOddHeadersFooters { get; set; }

Property Value

bool

true if headers and footers are different in even and odd pages; otherwise, false.

History

Gets the history of changes in this document.

Declaration

cs-api-definition
public DocumentHistory History { get; }

Property Value

DocumentHistory

IsEmpty

Gets a value indicating whether the document is empty.

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

true if the document is empty; otherwise, false.

IsStrictLineBreakingRuleEnabled

Gets or sets a value indicating whether the strict line breaking rule will be applied to Japanese text in this document.

Declaration

cs-api-definition
[XamlSerializable(false)]
public bool IsStrictLineBreakingRuleEnabled { get; set; }

Property Value

bool

IsTrackChangesEnabled

Gets or sets a value indicating whether this instance has track changes enabled.

Declaration

cs-api-definition
[XamlSerializable(false)]
public bool IsTrackChangesEnabled { get; set; }

Property Value

bool

true if this instance is track changes enabled; otherwise, false.

LayoutMode

Gets or sets a value representing the current layout mode.

Declaration

cs-api-definition
[XamlSerializable]
public DocumentLayoutMode LayoutMode { get; set; }

Property Value

DocumentLayoutMode

The layout mode.

LineBreakingRuleLanguage

Gets or sets the language which rules should be used for line breaking in the paragraphs.

Declaration

cs-api-definition
public LineBreakingRuleLanguage LineBreakingRuleLanguage { get; set; }

Property Value

LineBreakingRuleLanguage

The line breaking rule language.

LineSpacing

Gets or set the line spacing of this document.

Declaration

cs-api-definition
[XamlSerializable]
public double LineSpacing { get; set; }

Property Value

double

LineSpacingType

Gets or set the line spacing type of this document.

Declaration

cs-api-definition
[XamlSerializable]
public LineSpacingType LineSpacingType { get; set; }

Property Value

LineSpacingType

ListManager

Gets the list manager.

Declaration

cs-api-definition
public ListManager ListManager { get; }

Property Value

ListManager

The ListManager instance responsible for this document.

MailMergeDataSource

Gets the data source used for mail merge operations with this document.

Declaration

cs-api-definition
public MailMergeDataSource MailMergeDataSource { get; }

Property Value

MailMergeDataSource

The mail merge data source.

NoLineBreaksAfterRule

Gets or sets a rule determining which characters cannot end a line in East-Asian languages.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public LineBreakingRule NoLineBreaksAfterRule { get; set; }

Property Value

LineBreakingRule

NoLineBreaksBeforeRule

Gets or sets a rule determining which characters cannot start a line in East-Asian languages.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public LineBreakingRule NoLineBreaksBeforeRule { get; set; }

Property Value

LineBreakingRule

ParagraphDefaultSpacingAfter

Gets or sets the default spacing after a paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public double ParagraphDefaultSpacingAfter { get; set; }

Property Value

double

ParagraphDefaultSpacingBefore

Gets or sets the default spacing before a paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public double ParagraphDefaultSpacingBefore { get; set; }

Property Value

double

ProtectionSettings

Gets or sets the protection settings.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public DocumentProtectionSettings ProtectionSettings { get; set; }

Property Value

DocumentProtectionSettings

The protection settings.

SectionDefaultPageMargin

Gets or sets the default section page margin.

Declaration

cs-api-definition
[XamlSerializable]
public Padding SectionDefaultPageMargin { get; set; }

Property Value

Padding

SectionDefaultPageOrientation

Gets or sets the default section page orientation

Declaration

cs-api-definition
[XamlSerializable]
public PageOrientation SectionDefaultPageOrientation { get; set; }

Property Value

PageOrientation

SectionDefaultPageSize

Gets or sets the default section page size.

Declaration

cs-api-definition
[XamlSerializable]
public Size SectionDefaultPageSize { get; set; }

Property Value

Size

Sections

Gets a collection with the sections of the document.

Declaration

cs-api-definition
public SectionCollection Sections { get; }

Property Value

SectionCollection

A SectionCollection representing the sections of the document.

SelectedBibliographicStyle

Gets or sets the selected bibliographic style.

Declaration

cs-api-definition
public BibliographicReferenceStyleBase SelectedBibliographicStyle { get; set; }

Property Value

BibliographicReferenceStyleBase

The selected bibliographic style.

Selection

Gets a DocumentSelection representing the document selection.

Declaration

cs-api-definition
public DocumentSelection Selection { get; }

Property Value

DocumentSelection

The document selection.

ShowBookmarks

Gets or sets a value indicating whether to show bookmarks.

Declaration

cs-api-definition
public bool ShowBookmarks { get; set; }

Property Value

bool

true if the bookmarks should be visualized; otherwise, false.

ShowFormattingSymbols

Gets or sets a value indicating whether to show formatting symbols.

Declaration

cs-api-definition
public bool ShowFormattingSymbols { get; set; }

Property Value

bool

true if the formatting symbols should be visualized; otherwise, false.

ShowMergeFieldsHighlight

Gets or sets a value indicating whether the merge fields in the document should have a highlight.

Declaration

cs-api-definition
public bool ShowMergeFieldsHighlight { get; set; }

Property Value

bool

true if the merge fields should be highlighted; otherwise, false.

ShowReadOnlyRangesHighlight

Gets or sets a value indicating whether the read only ranges in the document should have a highlight.

Declaration

cs-api-definition
public bool ShowReadOnlyRangesHighlight { get; set; }

Property Value

bool

true if the read only ranges should be highlighted; otherwise, false.

StructureChangeInProgress

Gets a value indicating whether a structure change is in progress.

Declaration

cs-api-definition
public bool StructureChangeInProgress { get; }

Property Value

bool

true if the the structure of the document is currently being changed; otherwise, false.

StyleRepository

Gets the collection of styles inside the document.

Declaration

cs-api-definition
public StyleCollection StyleRepository { get; }

Property Value

StyleCollection

The style repository.

Methods

AddCustomListStyle(ListStyle)

Adds a custom list style to the document.

Declaration

cs-api-definition
public ListStyle AddCustomListStyle(ListStyle listStyle)

Parameters

listStyle

ListStyle

The list style.

Returns

ListStyle

The inserted ListStyle instance.

Arrange(RectangleF)

Arranges the document.

Declaration

cs-api-definition
public void Arrange(RectangleF arrangeRect)

Parameters

arrangeRect

RectangleF

The rectangle to arrange in.

BeginStylesUpdate()

Marks the start of styles editing and temporarily suspends the updates of the styles.

Declaration

cs-api-definition
public void BeginStylesUpdate()

CallOnDocumentContentChanged()

Calls the DocumentContentChanged event.

Declaration

cs-api-definition
protected void CallOnDocumentContentChanged()

CanUnprotectDocument(string)

Determines whether this instance can be unprotected using the specified password.

Declaration

cs-api-definition
public bool CanUnprotectDocument(string password)

Parameters

password

string

The password.

Returns

bool

true if this instance is protected and can be unprotected using the specified password; otherwise, false.

ContainsAnnotationMarkersOfType<T>()

Determines whether the document contains annotation markers of type T.

Declaration

cs-api-definition
public bool ContainsAnnotationMarkersOfType<T>() where T : AnnotationMarkerBase

Returns

bool

CopyPropertiesFromOverride(DocumentElement)

Copies the properties from another RadDocument to the current instance.

Declaration

cs-api-definition
protected override void CopyPropertiesFromOverride(DocumentElement element)

Parameters

element

DocumentElement

The RadDocument to copy the properties from.

Overrides DocumentElement.CopyPropertiesFromOverride(DocumentElement)

CreateDeepCopy()

Creates a deep copy of the document.

Declaration

cs-api-definition
public override DocumentElement CreateDeepCopy()

Returns

DocumentElement

The copied element.

Overrides DocumentElement.CreateDeepCopy()

CreateLayoutBox(DocumentStructureCollection)

Creates a DocumentLayoutBox for the element.

Declaration

cs-api-definition
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)

Parameters

documentCollection

DocumentStructureCollection

The document collection.

Returns

LayoutBox

Thew new DocumentLayoutBox.

Overrides DocumentElement.CreateLayoutBox(DocumentStructureCollection)

CreateNewElementInstance()

Creates a new RadDocument instance.

Declaration

cs-api-definition
protected override DocumentElement CreateNewElementInstance()

Returns

DocumentElement

The new instance.

Overrides DocumentElement.CreateNewElementInstance()

EndStylesUpdate()

Marks the end of styles editing and resumes the updates of the styles.

Declaration

cs-api-definition
public void EndStylesUpdate()

EnsureDocumentMeasuredAndArranged()

Ensures document layout is performed and layout-boxes have been created.

Declaration

cs-api-definition
public void EnsureDocumentMeasuredAndArranged()

Remarks

Call this method if the document is created in code and you need to access document's layout boxes.

GetAllBookmarks()

Gets all bookmarks in the document.

Declaration

cs-api-definition
public IEnumerable<BookmarkRangeStart> GetAllBookmarks()

Returns

IEnumerable<BookmarkRangeStart>

A collection of BookmarkRangeStart objects.

GetAllPermissionInfos()

Gets all PermissionRangeInfos for this document.

Declaration

cs-api-definition
public IEnumerable<PermissionRangeInfo> GetAllPermissionInfos()

Returns

IEnumerable<PermissionRangeInfo>

A collecction of PermissionRangeInfo objects.

GetAllRevisions()

Gets all revisions.

Declaration

cs-api-definition
public IEnumerable<Revision> GetAllRevisions()

Returns

IEnumerable<Revision>

GetAnnotationMarkersOfType<T>()

Gets all annotation markers of type T in the document.

Declaration

cs-api-definition
public IEnumerable<T> GetAnnotationMarkersOfType<T>() where T : AnnotationMarkerBase

Returns

IEnumerable<T>

GetBibliographicSource(string)

Tries to find a Bibliographic Source in the document. Returns null if none is found.

Declaration

cs-api-definition
public BibliographicSource GetBibliographicSource(string tagName)

Parameters

tagName

string

The tag name of the Source to be found.

Returns

BibliographicSource

GetBookmarkByName(string)

Gets a bookmark by its name.

Declaration

cs-api-definition
public BookmarkRangeStart GetBookmarkByName(string bookmarkName)

Parameters

bookmarkName

string

The name of the bookmark.

Returns

BookmarkRangeStart

The BookmarkRangeStart representing the bookmark.

GetCommentRangeStartByComment(Comment)

Gets the CommentRangeStart by comment.

Declaration

cs-api-definition
public CommentRangeStart GetCommentRangeStartByComment(Comment comment)

Parameters

comment

Comment

The comment.

Returns

CommentRangeStart

GetContainingAnnotationRanges<TRangeStart>(HierarchicalIndex, HierarchicalIndex)

Gets the annotation ranges of type TRangeStart surrounding specific positions.

Declaration

cs-api-definition
public IEnumerable<TRangeStart> GetContainingAnnotationRanges<TRangeStart>(HierarchicalIndex start, HierarchicalIndex end) where TRangeStart : AnnotationRangeStart

Parameters

start

HierarchicalIndex

The start.

end

HierarchicalIndex

The end.

Returns

IEnumerable<TRangeStart>

GetContainingAnnotationRanges<TRangeStart>(Inline, Predicate<TRangeStart>, bool)

Gets the annotation ranges of type TRangeStart surrounding an inline that match a condition.

Declaration

cs-api-definition
public IEnumerable<TRangeStart> GetContainingAnnotationRanges<TRangeStart>(Inline inline, Predicate<TRangeStart> filter, bool inclusive = false) where TRangeStart : AnnotationRangeStart

Parameters

inline

Inline

The inline.

filter

Predicate<TRangeStart>

The filter.

inclusive

bool

Specifies whether to return the inline itself if it is a TRangeStart.

Returns

IEnumerable<TRangeStart>

GetContainingAnnotationRanges<TRangeStart>(Inline, bool)

Gets the annotation ranges of type TRangeStart surrounding an inline.

Declaration

cs-api-definition
public IEnumerable<TRangeStart> GetContainingAnnotationRanges<TRangeStart>(Inline inline, bool inclusive = false) where TRangeStart : AnnotationRangeStart

Parameters

inline

Inline

The inline.

inclusive

bool

Specifies whether to return the inline itself if it is a TRangeStart.

Returns

IEnumerable<TRangeStart>

GetCurrentPermissions()

Gets the permission ranges included in the Selection. If the Selection is empty, the GetPermissions(Inline) method is invoked with the Inline under the CaretPosition.

Declaration

cs-api-definition
public IEnumerable<PermissionRangeInfo> GetCurrentPermissions()

Returns

IEnumerable<PermissionRangeInfo>

A collection of PermissionRangeInfo objects.

GetCurrentRevision()

Gets the current revision.

Declaration

cs-api-definition
public Revision GetCurrentRevision()

Returns

Revision

GetLayoutBoxByPosition(PointF)

Gets a layout box that intersects with a position.

Declaration

cs-api-definition
public LayoutBox GetLayoutBoxByPosition(PointF position)

Parameters

position

PointF

The position to intersect with.

Returns

LayoutBox

GetNextComment()

Gets the next comment.

Declaration

cs-api-definition
public CommentRangeStart GetNextComment()

Returns

CommentRangeStart

GetNextRevision()

Gets the next revision.

Declaration

cs-api-definition
public Revision GetNextRevision()

Returns

Revision

GetPermissions(Inline)

Gets the permission ranges included in a specified Inline.

Declaration

cs-api-definition
public IEnumerable<PermissionRangeInfo> GetPermissions(Inline inline)

Parameters

inline

Inline

The inline element from which PermissionRangeInfos should be obtained.

Returns

IEnumerable<PermissionRangeInfo>

A collection of PermissionRangeInfos inside the inline.

GetPreviousComment()

Gets the previous comment.

Declaration

cs-api-definition
public CommentRangeStart GetPreviousComment()

Returns

CommentRangeStart

GetPreviousRevision()

Gets the previous revision.

Declaration

cs-api-definition
public Revision GetPreviousRevision()

Returns

Revision

GetStatisticsInfo()

Gets the statistical information about the document.

Declaration

cs-api-definition
public DocumentStatisticsInfo GetStatisticsInfo()

Returns

DocumentStatisticsInfo

GoToBookmark(BookmarkRangeStart)

Moves the CaretPosition to the beginning of a bookmark.

Declaration

cs-api-definition
public void GoToBookmark(BookmarkRangeStart bookmarkStart)

Parameters

bookmarkStart

BookmarkRangeStart

The bookmark start.

GoToBookmark(string)

Moves the CaretPosition to the beginning of a bookmark.

Declaration

cs-api-definition
public void GoToBookmark(string bookmarkName)

Parameters

bookmarkName

string

The name of the bookmark.

GoToComment(Comment)

Selects a comment.

Declaration

cs-api-definition
public void GoToComment(Comment comment)

Parameters

comment

Comment

The comment.

GoToComment(CommentRangeStart)

Selects a comment.

Declaration

cs-api-definition
public void GoToComment(CommentRangeStart commentRangeStart)

Parameters

commentRangeStart

CommentRangeStart

The comment range start.

GoToNextComment()

Selects next comment.

Declaration

cs-api-definition
public CommentRangeStart GoToNextComment()

Returns

CommentRangeStart

GoToNextEndnote()

Moves current position to the next endnote.

Declaration

cs-api-definition
public void GoToNextEndnote()

GoToNextFootnote()

Moves current position to the next footnote.

Declaration

cs-api-definition
public void GoToNextFootnote()

GoToNextRevision()

Selects next revision.

Declaration

cs-api-definition
public Revision GoToNextRevision()

Returns

Revision

GoToPreviousComment()

Selects previous comment.

Declaration

cs-api-definition
public CommentRangeStart GoToPreviousComment()

Returns

CommentRangeStart

GoToPreviousEndnote()

Moves current position to the previous endnote.

Declaration

cs-api-definition
public void GoToPreviousEndnote()

GoToPreviousFootnote()

Moves current position to the previous footnote.

Declaration

cs-api-definition
public void GoToPreviousFootnote()

GoToPreviousRevision()

Selects previous revision.

Declaration

cs-api-definition
public Revision GoToPreviousRevision()

Returns

Revision

GoToRevision(Revision)

Selects revision.

Declaration

cs-api-definition
public void GoToRevision(Revision revision)

Parameters

revision

Revision

The revision.

IsInAnnotationRange<TRangeStart>(Inline, Predicate<TRangeStart>, bool)

Determines whether the specified inline is in annotation range of type TRangeStart that matches a condition.

Declaration

cs-api-definition
public bool IsInAnnotationRange<TRangeStart>(Inline inline, Predicate<TRangeStart> filter, bool inclusive = false) where TRangeStart : AnnotationRangeStart

Parameters

inline

Inline

The inline.

filter

Predicate<TRangeStart>

The filter.

inclusive

bool

Specifies whether to return the inline itself if it is a TRangeStart.

Returns

bool

IsInAnnotationRange<TRangeStart>(Inline, bool)

Determines whether the specified inline is in annotation range of type TRangeStart.

Declaration

cs-api-definition
public bool IsInAnnotationRange<TRangeStart>(Inline inline, bool inclusive = false) where TRangeStart : AnnotationRangeStart

Parameters

inline

Inline

The inline.

inclusive

bool

Specifies whether to return the inline itself if it is a TRangeStart.

Returns

bool

MailMerge(bool)

Mail merges the document using the MailMergeDataSource.

Declaration

cs-api-definition
public RadDocument MailMerge(bool startEachRecordOnNewPage = true)

Parameters

startEachRecordOnNewPage

bool

A boolean value indicating whether the records should start each on a new page.

Returns

RadDocument

A RadDocument instance representing the result of the merge.

MailMergeCurrentRecord()

Mail merges the document using the current record from the MailMergeDataSource.

Declaration

cs-api-definition
public RadDocument MailMergeCurrentRecord()

Returns

RadDocument

A RadDocument instance representing the result of the merge.

Measure(SizeF)

Measures the document.

Declaration

cs-api-definition
public void Measure(SizeF measureSize)

Parameters

measureSize

SizeF

The size to measure in.

MeasureAndArrangeInDefaultSize()

Forces document layout update, measuring document in MAX_DOCUMENT_SIZE.

Declaration

cs-api-definition
public void MeasureAndArrangeInDefaultSize()

MergeSpansWithSameStyles()

Merges adjacent spans with same style properties into one.

Declaration

cs-api-definition
public void MergeSpansWithSameStyles()

Remarks

This method is automatically called when document is measured during the layout process.

Calling it explicitly is generally not needed and may only be useful in case spans are manually added to Paragraph.Inlines collection.

OnDocumentArranged()

Called after arranging the document.

Declaration

cs-api-definition
protected virtual void OnDocumentArranged()

OnDocumentContentChanged()

Called when document content has been changed.

Declaration

cs-api-definition
protected virtual void OnDocumentContentChanged()

OnLayoutModeChanged()

Called after changing the LayoutMode. Raises LayoutModeChanged event.

Declaration

cs-api-definition
protected virtual void OnLayoutModeChanged()

OnMergeFieldToStringConverting(MergeFieldToStringConvertingEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnMergeFieldToStringConverting(MergeFieldToStringConvertingEventArgs e)

Parameters

e

MergeFieldToStringConvertingEventArgs

The MergeFieldToStringConvertingEventArgs instance containing the event data.

OnPresentationChanged(PresentationChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnPresentationChanged(PresentationChangedEventArgs e)

Parameters

e

PresentationChangedEventArgs

The PresentationChangedEventArgs instance containing the event data.

OnPresentationChanging()

Called when changing the document presentation.

Declaration

cs-api-definition
protected virtual void OnPresentationChanging()

OnProtectionSettingsChanged()

Called when the protection settings of the document has been changed.

Declaration

cs-api-definition
protected virtual void OnProtectionSettingsChanged()

OnRequestCurrentUserInfo(RequestCurrentUserInfoEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnRequestCurrentUserInfo(RequestCurrentUserInfoEventArgs e)

Parameters

e

RequestCurrentUserInfoEventArgs

The RequestCurrentUserInfoEventArgs instance containing the event data.

OnStreamFromUriResolving(StreamFromUriResolvingEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnStreamFromUriResolving(StreamFromUriResolvingEventArgs e)

Parameters

e

StreamFromUriResolvingEventArgs

The StreamFromUriResolvingEventArgs instance containing the event data.

OnStyleChanged()

Called after the style of a document element has been changed.

Declaration

cs-api-definition
protected override void OnStyleChanged()

Overrides DocumentElement.OnStyleChanged()

OnUserAuthenticationRequest(UserAuthenticationRequestEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnUserAuthenticationRequest(UserAuthenticationRequestEventArgs e)

Parameters

e

UserAuthenticationRequestEventArgs

The UserAuthenticationRequestEventArgs instance containing the event data.

ProtectDocument(DocumentProtectionMode, string)

Protects the document.

Declaration

cs-api-definition
public void ProtectDocument(DocumentProtectionMode protectionMode, string password)

Parameters

protectionMode

DocumentProtectionMode

The protection mode.

password

string

The password.

Exceptions

InvalidOperationException

Cannot protect a document that is already protected.

UnprotectDocument(string)

Removes the protection from the document.

Declaration

cs-api-definition
public bool UnprotectDocument(string password)

Parameters

password

string

The password.

Returns

bool

Exceptions

InvalidOperationException

Cannot unprotect a document that is not protected.

UpdateLayout()

Forces the document to update its layout.

Declaration

cs-api-definition
public void UpdateLayout()

UpdateStyles()

Updates the styles inside the document.

Declaration

cs-api-definition
public void UpdateStyles()

Events

DocumentArranged

Occurs when the document has been arranged.

Declaration

cs-api-definition
public event EventHandler DocumentArranged

Event Value

EventHandler

DocumentContentChanged

Occurs when the document content has changed.

Declaration

cs-api-definition
public event EventHandler DocumentContentChanged

Event Value

EventHandler

DocumentElementAdded

Occurs when a document element is added in the whole document tree.

Declaration

cs-api-definition
public event EventHandler<DocumentElementAddedEventArgs> DocumentElementAdded

Event Value

EventHandler<DocumentElementAddedEventArgs>

DocumentElementRemoved

Occurs when a document element is removed from the whole document tree.

Declaration

cs-api-definition
public event EventHandler<DocumentElementRemovedEventArgs> DocumentElementRemoved

Event Value

EventHandler<DocumentElementRemovedEventArgs>

DocumentVariableEvaluating

Occurs when the result of a document variable is being evaluated.

Declaration

cs-api-definition
public event EventHandler<DocumentVariableEvaluatingEventArgs> DocumentVariableEvaluating

Event Value

EventHandler<DocumentVariableEvaluatingEventArgs>

HyperlinkClicked

Occurs when the users clicks on a hyperlink in the current document.

Declaration

cs-api-definition
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked

Event Value

EventHandler<HyperlinkClickedEventArgs>

LayoutModeChanged

Occurs when the LayoutMode property value has changed.

Declaration

cs-api-definition
public event EventHandler LayoutModeChanged

Event Value

EventHandler

MergeFieldToStringConverting

Occurs when merge field is being converted to string.

Declaration

cs-api-definition
public event EventHandler<MergeFieldToStringConvertingEventArgs> MergeFieldToStringConverting

Event Value

EventHandler<MergeFieldToStringConvertingEventArgs>

PresentationChanged

Occurs when document presentation is changed.

Declaration

cs-api-definition
public event EventHandler<PresentationChangedEventArgs> PresentationChanged

Event Value

EventHandler<PresentationChangedEventArgs>

PresentationChanging

Occurs when the document presenter is changing.

Declaration

cs-api-definition
public event EventHandler PresentationChanging

Event Value

EventHandler

ProtectionSettingsChanged

Occurs when the protection settings of the document has been changed.

Declaration

cs-api-definition
public event EventHandler ProtectionSettingsChanged

Event Value

EventHandler

RequestCurrentUserInfo

Occurs when an information for the current user is needed.

Declaration

cs-api-definition
public event EventHandler<RequestCurrentUserInfoEventArgs> RequestCurrentUserInfo

Event Value

EventHandler<RequestCurrentUserInfoEventArgs>

StreamFromUriResolving

Occurs when trying to create a Stream from a Uri.

Declaration

cs-api-definition
public event EventHandler<StreamFromUriResolvingEventArgs> StreamFromUriResolving

Event Value

EventHandler<StreamFromUriResolvingEventArgs>

UserAuthenticationRequest

Occurs when a user should be authenticated.

Declaration

cs-api-definition
public event EventHandler<UserAuthenticationRequestEventArgs> UserAuthenticationRequest

Event Value

EventHandler<UserAuthenticationRequestEventArgs>

In this article
DefinitionConstructorsRadDocument()FieldsDefaultTabWidthPropertyEndnotesFirstNumberPropertyEndnotesNumberingFormatPropertyEndnotesNumberingRestartTypePropertyEndnotesPositionPropertyFootnotesFirstNumberPropertyFootnotesNumberingFormatPropertyFootnotesNumberingRestartTypePropertyFootnotesPositionPropertyMAX_DOCUMENT_SIZESectionDefaultPageMarginPropertySectionDefaultPageOrientationPropertySectionDefaultPageSizePropertyPropertiesBibliographicSourcesBibliographicStylesCaptionDefinitionsCaretPositionCodeFormatterDefaultTabWidthDesiredSizeDocumentContentChangedIntervalDocumentLayoutBoxDocumentVariablesEndnotesFirstNumberEndnotesNumberingFormatEndnotesNumberingRestartTypeEndnotesPositionFieldsDisplayModeFootnotesFirstNumberFootnotesNumberingFormatFootnotesNumberingRestartTypeFootnotesPositionHasDifferentEvenAndOddHeadersFootersHistoryIsEmptyIsStrictLineBreakingRuleEnabledIsTrackChangesEnabledLayoutModeLineBreakingRuleLanguageLineSpacingLineSpacingTypeListManagerMailMergeDataSourceNoLineBreaksAfterRuleNoLineBreaksBeforeRuleParagraphDefaultSpacingAfterParagraphDefaultSpacingBeforeProtectionSettingsSectionDefaultPageMarginSectionDefaultPageOrientationSectionDefaultPageSizeSectionsSelectedBibliographicStyleSelectionShowBookmarksShowFormattingSymbolsShowMergeFieldsHighlightShowReadOnlyRangesHighlightStructureChangeInProgressStyleRepositoryMethodsAddCustomListStyle(ListStyle)Arrange(RectangleF)BeginStylesUpdate()CallOnDocumentContentChanged()CanUnprotectDocument(string)ContainsAnnotationMarkersOfType<T>()CopyPropertiesFromOverride(DocumentElement)CreateDeepCopy()CreateLayoutBox(DocumentStructureCollection)CreateNewElementInstance()EndStylesUpdate()EnsureDocumentMeasuredAndArranged()GetAllBookmarks()GetAllPermissionInfos()GetAllRevisions()GetAnnotationMarkersOfType<T>()GetBibliographicSource(string)GetBookmarkByName(string)GetCommentRangeStartByComment(Comment)GetContainingAnnotationRanges<TRangeStart>(HierarchicalIndex, HierarchicalIndex)GetContainingAnnotationRanges<TRangeStart>(Inline, Predicate<TRangeStart>, bool)GetContainingAnnotationRanges<TRangeStart>(Inline, bool)GetCurrentPermissions()GetCurrentRevision()GetLayoutBoxByPosition(PointF)GetNextComment()GetNextRevision()GetPermissions(Inline)GetPreviousComment()GetPreviousRevision()GetStatisticsInfo()GoToBookmark(BookmarkRangeStart)GoToBookmark(string)GoToComment(Comment)GoToComment(CommentRangeStart)GoToNextComment()GoToNextEndnote()GoToNextFootnote()GoToNextRevision()GoToPreviousComment()GoToPreviousEndnote()GoToPreviousFootnote()GoToPreviousRevision()GoToRevision(Revision)IsInAnnotationRange<TRangeStart>(Inline, Predicate<TRangeStart>, bool)IsInAnnotationRange<TRangeStart>(Inline, bool)MailMerge(bool)MailMergeCurrentRecord()Measure(SizeF)MeasureAndArrangeInDefaultSize()MergeSpansWithSameStyles()OnDocumentArranged()OnDocumentContentChanged()OnLayoutModeChanged()OnMergeFieldToStringConverting(MergeFieldToStringConvertingEventArgs)OnPresentationChanged(PresentationChangedEventArgs)OnPresentationChanging()OnProtectionSettingsChanged()OnRequestCurrentUserInfo(RequestCurrentUserInfoEventArgs)OnStreamFromUriResolving(StreamFromUriResolvingEventArgs)OnStyleChanged()OnUserAuthenticationRequest(UserAuthenticationRequestEventArgs)ProtectDocument(DocumentProtectionMode, string)UnprotectDocument(string)UpdateLayout()UpdateStyles()EventsDocumentArrangedDocumentContentChangedDocumentElementAddedDocumentElementRemovedDocumentVariableEvaluatingHyperlinkClickedLayoutModeChangedMergeFieldToStringConvertingPresentationChangedPresentationChangingProtectionSettingsChangedRequestCurrentUserInfoStreamFromUriResolvingUserAuthenticationRequest
Not finding the help you need?
Contact Support