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

Supplies a style collection, owner, and callbacks to a style-management dialog.

Definition

Namespace:Telerik.WinForms.Documents.UI.Extensibility

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class ManageStylesDialogContext

Inheritance: objectManageStylesDialogContext

Constructors

Initializes the callbacks and document references used by the style-management dialog.

C#
public ManageStylesDialogContext(StyleCollection styleDefinitionCollection, Action createNewStyleDefinitionCallback, Action<StyleDefinition> editStyleDefinitionCallback, Action<StyleDefinition> deleteStyleDefinitionCallback, Action<string> changeDocumentElementStyleNameCallback, RadRichTextBox owner)
Parameters:styleDefinitionCollectionStyleCollection

The style collection from the owner's document.

createNewStyleDefinitionCallbackAction

Creates a new style when requested by the dialog.

editStyleDefinitionCallbackAction<StyleDefinition>

Edits the specified style.

deleteStyleDefinitionCallbackAction<StyleDefinition>

Deletes the specified style.

changeDocumentElementStyleNameCallbackAction<string>

Applies a selected style name to the active document selection; null clears style assignments.

ownerRadRichTextBox

The rich text box whose document is being managed.

Properties

Gets the callback invoked with the selected style name so the owner can apply it to the active document selection. The built-in dialog passes null for its Clear All entry to clear style assignments.

C#
public Action<string> ChangeDocumentElementStyleNameCallback { get; }

Gets the callback invoked when the user requests a new style.

C#
public Action CreateNewStyleDefinitionCallback { get; }

Gets the callback invoked to delete a style selected in the dialog.

C#
public Action<StyleDefinition> DeleteStyleDefinitionCallback { get; }

Gets the callback invoked to edit a style selected in the dialog.

C#
public Action<StyleDefinition> EditStyleDefinitionCallback { get; }

Gets the rich text box whose document and styles are managed.

C#
public RadRichTextBox Owner { get; }

Gets the document style collection available to the dialog.

C#
public StyleCollection StyleDefinitionCollection { get; }