Skip to main content

Style Editor Dialog

  • 2 minutes to read

The Modify Style dialog enables end-users to change the base style for the current style (to specify how the styles cascade), the style which should be used for the following paragraph, and basic characteristics of the style, such as Font, Paragraph and Tab Stops.

RTEModifyStyleMenu

If right-to-left and Eas-Asian languages are installed on the machine, the dialog appears as follows:

modifyStyle_rtl

End-users can invoke the Modify Style dialog using the Styles group’s dialog box launcher on the Home ribbon tab. Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to provide the Command UI for the RichEditControl. Executing the ShowEditStyleFormCommand invokes this dialog as well.

XtraRichEdit_Dialogs_StyleEditor_Invoke

Note that the Modify Style dialog does not allow you to create a new style. RichEditControl provides a set of methods to programmatically create a new style, and modify an existing style. Document styles are exposed via the CharacterStyle, the ParagraphStyle or the TableStyle interfaces. A document contains collections of styles, accessible via Document.CharacterStyles, Document.ParagraphStyles and Document.TableStyles properties. Use the CreateNew methods of style collections to create new styles. Then you can specify formatting using style properties and add style to a corresponding collection using the Add method. To learn more, refer to the Text Formatting topic.

To customize the default Modify Style dialog (change captions, set default dialog values, implement custom validation, etc.) or substitute it with a completely new dialog, handle the RichEditControl.EditStyleFormShowing event. To get an example of the dialog replacement, refer to the How to: Customize the Search Form or How to: Customize the Hyperlink Form document.

See Also