RichTextBox Control for C# Windows Forms
KetticRichTextBox control is capable of formatting rich text at design time and contains a variety of options for the users to edit the text and apply rich formatting options to their text content. The text formatting options include 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 Rich Text at Design Time
KetticRichTextBox is a rich text input control, and allows the users to format the text within the same control instance. The users can also use this control as a rich text viewer. Additionally, this control contains various C# classes for the users to format the text within it, including Section, Paragraph, Span, and InlineImage. After formatting the text, the formatted text is still editable. The KetticRichTextBox .NET component provides the IsReadOnly property for the users to make the text read only. The C# code below shows how to enable the Read Only mode in C#.NET project.
UI for Formatting KetticRichTextBox Content
KetticRichTextBox control allows the users to edit and format the content through creating a user interface and applying the C# API included in the KetticRichTextBox .NET component. The KetticRichTextBox C# API provides the methods, including ToggleBold(), ToggleItalic(), and more, for the users to customize the text within the control for Windows Forms. The following is a C# code sample that shows how to create a user interface
When we edit the content of KetticRichTextBox control on a position, the UI should response. For instance, the boldButton should be toggled when the caret is on a bold text. To do this, we shall handle the CurrentSpanStyleChanged event raised as the span gets changed, and customize the style of the span via the CurrentEditingStyle property in the event handler. In addition, the CurrentEditingStyle property contains GetPropertyValue() method for the users to pass the appropriate DependancyProperty to get the desired information. The C# code below demonstrates how to handle this event.
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