C# API for Formatting Content of RichTextBox
KetticRichTextBox control provides C# API for the developers to format the content of the control in C#.NET template project at run time. By applying the C# API in the Windows Forms application, the developers can build applications whose users are able to format the content through the user interface. There are a variety of formatting options available, such as bold, italic, underline, text color and text background, bullet and numbered lists, paragraph alignment and indentation, show or hide formatting symbols, clear formatting, and more.
Format Text in Document using API of KetticRichTextBox
The C# API included in the KetticRichTextBox component allows the developers to build users interfaces for the users to easily format the text that they input into the document. And then the user interface will call the C# API methods of the KetticRichTextBox to perform the text formatting.
Furthermore, KetticRichTextBox control contains methods that are capable of customizing the appearance and style of the text and the paragraph in the document. Normally, when the users change the format of the content in the document, their action to the UI will call the relative method, which will apply the style to the text that is selected. If there is no text or content selected, the method will apply the style to the text where the caret is placed. C# code Sample for Formatting Text in Document
In the C# code sample below, we are going to format a toggle button and bold the text that is selected currently. The C# code call the ToggleBold() method in the event handler for the Click event of the KetticToggleButton.
|
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlGet Started in C#RichTextBox - SettingsDocument ElementsContentsSectionParagraphSpanHyperlinkInline ImageTableBookmarksRichTextBox - FeaturesLayout ModesSelectionSearchPositionRead OnlyFormat APIImport & ExportImport & Export - SettingsHTML SupportSpell CheckKeyboard SupportWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |