From 056f6a187974f99a0231aaf63c37224fc2430981 Mon Sep 17 00:00:00 2001 From: KB Bot Date: Tue, 7 Oct 2025 07:54:19 +0000 Subject: [PATCH 1/3] Added new kb article richtexteditor-set-background-colors --- .../richtexteditor-set-background-colors.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 knowledge-base/richtexteditor-set-background-colors.md diff --git a/knowledge-base/richtexteditor-set-background-colors.md b/knowledge-base/richtexteditor-set-background-colors.md new file mode 100644 index 000000000..7f2a7982e --- /dev/null +++ b/knowledge-base/richtexteditor-set-background-colors.md @@ -0,0 +1,57 @@ +--- +title: Setting Document Background and Editor Background in UI for WinForms RichTextEditor +description: Learn how to set the document background and the editor background in UI for WinForms RichTextEditor. +type: how-to +page_title: How to Change Document and Editor Background Colors in UI for WinForms RichTextEditor +meta_title: How to Change Document and Editor Background Colors in UI for WinForms RichTextEditor +slug: set-document-editor-background-ui-winforms-richtexteditor +tags: richtexteditor, ui for winforms, document background, editor background, pagebackcolor, backcolor +res_type: kb +ticketid: 1700509 +--- + +## Environment + + + + + + + + + + + +
ProductRichTextEditor for UI for WinForms
Version2025.3.812
+ +## Description + +I want to set the document's background color to white and the editor's background color to gray in the [RichTextEditor](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview) component of UI for WinForms. + +This knowledge base article also answers the following questions: +- How to customize the background color of RichTextEditor pages? +- How to set different colors for the RichTextEditor editor and document? +- How to use PageBackColor and BackColor properties in UI for WinForms RichTextEditor? + +## Solution + +To set the desired background colors for the document and editor: + +1. Use the `RichTextBoxElement.BackColor` property to assign a color to the editor background. +2. Use the `RadRichTextEditor.PageBackColor` property to assign a color to the document's background. + +Example code: + +```csharp +// Set editor background to gray +this.radRichTextEditor1.RichTextBoxElement.BackColor = Color.LightGray; + +// Set document background to white +this.radRichTextEditor1.PageBackColor = Color.White; +``` + +## See Also + +- [RichTextEditor Overview](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview) +- [BackColor Property Documentation](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/api/telerik.winforms.ui.radtextboxelement.backcolor) +- [PageBackColor Property Documentation](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/api/telerik.winforms.ui.radrichtexteditor.pagebackcolor) From b957b827a7e22ae51f43863c5214607c3429faaa Mon Sep 17 00:00:00 2001 From: Nadya Todorova <48494959+nade7o@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:59:54 +0300 Subject: [PATCH 2/3] Update richtexteditor-set-background-colors.md --- .../richtexteditor-set-background-colors.md | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/knowledge-base/richtexteditor-set-background-colors.md b/knowledge-base/richtexteditor-set-background-colors.md index 7f2a7982e..88f13a15c 100644 --- a/knowledge-base/richtexteditor-set-background-colors.md +++ b/knowledge-base/richtexteditor-set-background-colors.md @@ -4,25 +4,17 @@ description: Learn how to set the document background and the editor background type: how-to page_title: How to Change Document and Editor Background Colors in UI for WinForms RichTextEditor meta_title: How to Change Document and Editor Background Colors in UI for WinForms RichTextEditor -slug: set-document-editor-background-ui-winforms-richtexteditor +slug: richtexteditor-set-background-colors tags: richtexteditor, ui for winforms, document background, editor background, pagebackcolor, backcolor res_type: kb ticketid: 1700509 --- ## Environment - - - - - - - - - - - -
ProductRichTextEditor for UI for WinForms
Version2025.3.812
+ +|Product Version|Product|Author| +|----|----|----| +|2025.3.812|RichTextEditor for WinForms|[Nadya Karaivanova](https://www.telerik.com/blogs/author/nadya-karaivanova)| ## Description @@ -43,15 +35,13 @@ To set the desired background colors for the document and editor: Example code: ```csharp -// Set editor background to gray +// Set editor background color this.radRichTextEditor1.RichTextBoxElement.BackColor = Color.LightGray; -// Set document background to white +// Set page background this.radRichTextEditor1.PageBackColor = Color.White; ``` ## See Also - [RichTextEditor Overview](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview) -- [BackColor Property Documentation](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/api/telerik.winforms.ui.radtextboxelement.backcolor) -- [PageBackColor Property Documentation](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/api/telerik.winforms.ui.radrichtexteditor.pagebackcolor) From 4ae4099ed273e4735c6773233f307fac6c286a92 Mon Sep 17 00:00:00 2001 From: Dinko Krastev Date: Fri, 10 Oct 2025 14:47:23 +0300 Subject: [PATCH 3/3] Update richtexteditor-set-background-colors.md --- knowledge-base/richtexteditor-set-background-colors.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/knowledge-base/richtexteditor-set-background-colors.md b/knowledge-base/richtexteditor-set-background-colors.md index 88f13a15c..c73664b6b 100644 --- a/knowledge-base/richtexteditor-set-background-colors.md +++ b/knowledge-base/richtexteditor-set-background-colors.md @@ -34,14 +34,16 @@ To set the desired background colors for the document and editor: Example code: -```csharp +````C# + // Set editor background color this.radRichTextEditor1.RichTextBoxElement.BackColor = Color.LightGray; // Set page background this.radRichTextEditor1.PageBackColor = Color.White; -``` + +```` ## See Also -- [RichTextEditor Overview](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview) +* [RichTextEditor Overview](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview)