New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public class InsertCaptionDialogContext

Inheritance: objectInsertCaptionDialogContext

Constructors

Initializes a context for the specified document and records whether cancellation should clear its selection.

C#
public InsertCaptionDialogContext(RadDocument document, bool shouldClearSelectionOnClose)
Parameters:documentRadDocument

The document whose caption definitions and content the dialog edits.

shouldClearSelectionOnClosebool

true to clear the document selection when the dialog is cancelled.

Properties

Gets or sets the document in which the caption will be inserted.

C#
public RadDocument Document { get; set; }

Methods

Clears the document selection when the context was configured to clear it on cancellation.

C#
public void CancelCallback()

Applies the caption definition, inserts the caption, and updates other captions that use the same definition in one undo group.

C#
public void InsertCaption(CaptionDefinition newCaptionDefinition, string captionText, bool includeLabel, bool insertBelow)
Parameters:newCaptionDefinitionCaptionDefinition

The caption label and numbering settings to apply to the document.

captionTextstring

The text to place after the generated caption number.

includeLabelbool

true to include the caption label before the number.

insertBelowbool

true to place the caption below the current selection.