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

Carries the document, owner, and optional existing style data used to create or edit styles in the formatting dialog. It also supplies the default style factories and persistence operations used by that dialog.

Definition

Namespace:Telerik.WinForms.Documents.UI.Extensibility

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class StyleFormattingPropertiesDialogContext

Inheritance: objectStyleFormattingPropertiesDialogContext

Constructors

Initializes a new instance of the StyleFormattingPropertiesDialogContext class. Use it for editing of list style.

C#
public StyleFormattingPropertiesDialogContext(string dialogTitle, ListStyle realListStyle, RadRichTextBox owner)
Parameters:dialogTitlestring

The dialog title.

realListStyleListStyle

The real list style.

ownerRadRichTextBox

The owner.

Initializes a new instance of the StyleFormattingPropertiesDialogContext class. Use it for creation of new style.

C#
public StyleFormattingPropertiesDialogContext(string dialogTitle, RadRichTextBox owner)
Parameters:dialogTitlestring

The dialog title.

ownerRadRichTextBox

The owner.

Initializes a new instance of the StyleFormattingPropertiesDialogContext class. Use it for editing of style definition.

C#
public StyleFormattingPropertiesDialogContext(string dialogTitle, StyleDefinition realStyleDefinition, RadRichTextBox owner)
Parameters:dialogTitlestring

The dialog title.

realStyleDefinitionStyleDefinition

The real style definition.

ownerRadRichTextBox

The owner.

Initializes a new instance of the StyleFormattingPropertiesDialogContext class. Use it for creation of new style with specified type.

C#
public StyleFormattingPropertiesDialogContext(string dialogTitle, StyleType styleType, RadRichTextBox owner)
Parameters:dialogTitlestring

The dialog title.

styleTypeStyleType

Type of the style.

ownerRadRichTextBox

The owner.

Properties

Gets or sets the title displayed by the style-formatting dialog.

C#
public string DialogTitle { get; }

Gets the document owned by Owner.

C#
public RadDocument Document { get; }

Gets or sets the rich text box whose document and editor state are used by the dialog.

C#
public RadRichTextBox Owner { get; }

Gets or sets the existing list style being edited, when applicable.

C#
public ListStyle RealListStyle { get; }

Gets or sets the existing style definition being edited, when applicable.

C#
public StyleDefinition RealStyleDefinition { get; }

Gets the owner's style repository.

C#
public StyleCollection StyleCollection { get; }

Gets the requested style category when the context is used to create a style.

C#
public StyleType StyleType { get; }

Methods

Adds a non-null list style to the owner's document.

C#
public virtual void AddListStyle(ListStyle listStyle)
Parameters:listStyleListStyle

The list style to add.

Adds a copy of a named style definition to the owner's repository and activates it in the editor. If the supplied style has a linked style, this method also renames that linked style by appending Char to the main style name.

C#
public virtual void AddStyleDefinition(StyleDefinition style)
Parameters:styleStyleDefinition

The style definition to copy into the repository.

Applies the supplied list-style values to the existing list style with the same ID, then refreshes document presentation and layout.

C#
public virtual void EditListStyle(ListStyle listStyle)
Parameters:listStyleListStyle

The edited list-style values.

Copies the edited style properties into the existing definition and refreshes document presentation and layout.

C#
public virtual void EditStyleDefinition(StyleDefinition style)
Parameters:styleStyleDefinition

The edited style values to apply to RealStyleDefinition.

Creates a custom character style with the next available name.

C#
public virtual StyleDefinition GetCharacterStyle()
Returns:

StyleDefinition

A new character style that has not yet been added to the document.

Creates a paragraph style with an associated character style named by appending Char.

C#
public virtual StyleDefinition GetLinkedStyle()
Returns:

StyleDefinition

A new linked-style definition that has not yet been added to the document.

Creates a list style from the default parenthesized numbering pattern and assigns the next available style link.

C#
public virtual ListStyle GetListStyle()
Returns:

ListStyle

A new list style that has not yet been added to the document.

Creates a custom paragraph style based on the document's Normal style.

C#
public virtual StyleDefinition GetParagraphStyle()
Returns:

StyleDefinition

A new paragraph style that has not yet been added to the document.

Gets the owner's action for displaying the symbol-insertion dialog.

C#
public virtual Action<Action<char, FontFamily>, FontFamily, RadRichTextBox> GetShowInsertSymbolDialogAction()
Returns:

Action<Action<char, FontFamily>, FontFamily, RadRichTextBox>

A delegate that displays the owner's symbol dialog.

Creates a default style definition for the requested category. Character, paragraph, and table styles receive category-specific defaults; other types use the generic defaults.

C#
public virtual StyleDefinition GetStyle(StyleType styleType)
Parameters:styleTypeStyleType

The model style category to create.

Returns:

StyleDefinition

A new, named style definition that has not yet been added to the document.

Creates a custom table style based on the default normal table style with priority 100 and single auto line spacing.

C#
public virtual StyleDefinition GetTableStyle()
Returns:

StyleDefinition

A new table style that has not yet been added to the document.