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 Design
WinForms UI Controls