Settings of RichTextBox Control for C# Windows Forms
KetticRichTextBox control for Windows Forms is capable of the import and export of documents in various formats, including rtf, html, xaml, docx, plain text and pdf. To set the contents of the documents, we should clear the format of the data in the document. KetticRichTextBox control contains various format providers for the users to deal with the import and export of the documents. Additionally, this controls also allows the users to set the margins of a documents.
Get and Set the Text of KetticRichTextBox
To get and set the text of KetticRichTextBox control, we can use the format providers and assemblies included in the component listed as below.
To get the content of the document in a specific format, we shall create an instance of the corresponding provider and export the document. The C# code below shows how to export an plain text file.
We can also use the same way to set the content of KetticRichTextBox when the content is in one of the formats. The C# code below demonstrates how to import an html string in the document of KetticRichTextBox.
KetticRichTextBox control provides the Insert methods for KetticDocument and KetticRichTextBox to save the initial document content and insert text at different positions in the document. The Insert method applies the current span style of the document and the KetticDocument method allows the users to create a StyleDefinition and fill it up with the property values of the text. The following are the C# code examples. C# Insert Text in KetticRichTextBox at Caret Position
C# Insert Text in a Custom Style using method of KetticDocument
C# Insert Text in Current Editing Style of the RichTextBox
C# Set Margins of the Document
|
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 |