$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
RichTextBox Control for Windows Forms
Edit rich text content with text formatting options, mail-merge, table, and floating objects, etc.
Home > WinForms UI Controls > User Manual > RichTextBox Content Element in C#

C# Customize Contents of KetticDocument in RichTextBox

In the elements hierarchy of KetticRichTextBox, the KetticDocument is the root in the content of KetticRichTextBox. By using the KetticDocument element, the users can customize the style and appearance of the entire child elements. The KetticDocument contains one section in the document and declare all sections merged into one. In this article, we are going through the customization of the contents of the KetticDocument.

Customize the Contents of KetticDocument

To customize the contents of KetticDocument, we shall use the properties included in the KetticDocument. These properties allow the users to customize the layout of the child elements of KetticDocument. They are listed as below.
  • DefaultPageLayoutSettings, this property is of type PageLayoutSettings, which contains two properties for the users to customize the size of the page, Height and Width.
  • LineSpacing, this property is used to set the space between the lines.
  • PageViewMargin, this property determines the margins between the content and the borders in the KetticRichTextBox.
  • LayoutMode, this property is able to assign the page to be in Paged or Flow layout mode.
  • LineSpacingType, this property is used to determine the type of spacing. There are three modes available to this property, AtLeast, Auto, and Exact. The AtLeast mode determines the space between the lines that will be equal or greater than the value of the LineSpacing property. The Auto mode determines the space between the lines automatically. And the Exact mode determines the space between the lines that will be equal to the value of the LineSpacing property.
  • DisplayFormattingSymbols, this property is used to display the formatting symbols.
  • SectionDefaultPageMargin, this property is used to determine the default margin of the section in the KetticDocument. The respective property of the Section C# class allows the users to vary the margins for the sections.
  • DefaultSpacingBeforeParagraph, this property is used to define the default spacing before the paragraph in the KetticDocument. To vary the spacing before the different paragraphs, use the respective property of the Paragraph C# class.
  • DefaultSpacingAfterParagraph, this property is used to determine the default spacing after all the paragraph in the KetticDocument. To vary the spacing after different paragraphs, use the respective property of the Paragraph C# class.
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