Supplies document state and caption insertion operations to an insert-caption dialog.
Definition
Namespace:Telerik.WinForms.Documents.UI.Extensibility
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class InsertCaptionDialogContext
Inheritance: objectInsertCaptionDialogContext
Constructors
Initializes a context for the specified document and records whether cancellation should clear its selection.
public InsertCaptionDialogContext(RadDocument document, bool shouldClearSelectionOnClose)
The document whose caption definitions and content the dialog edits.
shouldClearSelectionOnClosebooltrue to clear the document selection when the dialog is cancelled.
Properties
Gets or sets the document in which the caption will be inserted.
public RadDocument Document { get; set; }
Methods
Clears the document selection when the context was configured to clear it on cancellation.
public void CancelCallback()
Applies the caption definition, inserts the caption, and updates other captions that use the same definition in one undo group.
public void InsertCaption(CaptionDefinition newCaptionDefinition, string captionText, bool includeLabel, bool insertBelow)
The caption label and numbering settings to apply to the document.
captionTextstringThe text to place after the generated caption number.
includeLabelbooltrue to include the caption label before the number.
insertBelowbooltrue to place the caption below the current selection.