Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions Document-Processing/Word/Word-Processor/wpf/Background.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Background in WPF RichTextBox control | Syncfusion
description: Learn here all about Background support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
description: Learn about the Background support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
platform: document-processing
control: SfRichTextBoxAdv
documentation: ug
keywords: background
---

# Setting Background for WPF RichTextBox
The [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor) control allows you to change background color of the control. A background of a control is represented by `Background` property of `SfRichTextBoxAdv` class. The default value of this property is black.
The [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor) control allows you to change background color of the control. A background of a control is represented by [`Background`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.html#Syncfusion_Windows_Controls_RichTextBoxAdv_SfRichTextBoxAdv_Background) property of `SfRichTextBoxAdv` class. The default value of this property is black.

The following code illustrates how to apply color as background to the document.

Expand All @@ -31,25 +31,25 @@ richTextBoxAdv.Background = new SolidColorBrush(Color.FromRgb(102, 153, 204));
Dim richTextBoxAdv As New SfRichTextBoxAdv()

' Sets the control background color.
richTextBoxAdv.Background = new SolidColorBrush(Color.FromRgb(102, 153, 204))
richTextBoxAdv.Background = New SolidColorBrush(Color.FromRgb(102, 153, 204))


{% endhighlight %}

{% endtabs %}

Pages layout
**Pages layout:**
![Changing Background color of Page Layout in WPF RichTextBox](Image_images/wpf-richtextbox-page-layout-background.PNG)

Continuous layout
**Continuous layout:**
![Changing Background color of Continuous Layout in WPF RichTextBox](Image_images/wpf-richtextbox-continuous-layout-background.PNG)

Block layout
**Block layout:**
The block layout always inherits the control background color.
![Changing Background color of Block Layout in WPF RichTextBox](Image_images/wpf-richtextbox-block-layout-background.PNG)

### How to override the document background in continuous layout type?
By default, the document background properties will be applied when the `LayoutType` is continuous. You can suppress the document background and apply the control background by setting `OverridesDocumentBackground` property to true. The default value of this property is false.
## How to override the document background in continuous layout type?
By default, the document background properties will be applied when the `LayoutType` is continuous. You can suppress the document background and apply the control background by setting [`OverridesDocumentBackground`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.html#Syncfusion_Windows_Controls_RichTextBoxAdv_SfRichTextBoxAdv_OverridesDocumentBackground) property to true. The default value of this property is false.

N> This property is valid only when the `LayoutType` is continuous.

Expand All @@ -66,7 +66,7 @@ The following code illustrates how to override the document background color.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
// Sets the control background color
richTextBoxAdv.Background = new SolidColorBrush(Color.FromRgb(102, 153, 204));
// Sets the layout type as continous
// Sets the layout type as continuous
richTextBoxAdv.LayoutType = LayoutType.Continuous;
//Enable the OverridesDocumentBackground property
richTextBoxAdv.OverridesDocumentBackground = true;
Expand All @@ -77,8 +77,8 @@ richTextBoxAdv.OverridesDocumentBackground = true;
' Initializes a new instance of RichTextBoxAdv.
Dim richTextBoxAdv As New SfRichTextBoxAdv()
' Sets the control background color.
richTextBoxAdv.Background = new SolidColorBrush(Color.FromRgb(102, 153, 204))
' Sets the layout type as continous
richTextBoxAdv.Background = New SolidColorBrush(Color.FromRgb(102, 153, 204))
' Sets the layout type as continuous
richTextBoxAdv.LayoutType = LayoutType.Continuous
' Enable the OverridesDocumentBackground property
richTextBoxAdv.OverridesDocumentBackground = true
Expand All @@ -88,15 +88,16 @@ richTextBoxAdv.OverridesDocumentBackground = true

{% endtabs %}

Continuous layout:
**Continuous layout:**
![Changing Background color of Continuous Layout in WPF RichTextBox](Image_images/wpf-richtextbox-continous-background.PNG)

## Setting Background for Document Pages

The RichTextBox control allows you to change background color of the document pages. A background of a document is represented by `Background` property of `DocumentAdv` class. The default value of this property is white.
The RichTextBox control allows you to change background color of the document pages. A background of a document is represented by [`Background`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.RichTextBoxAdv.DocumentAdv.html#Syncfusion_Windows_Controls_RichTextBoxAdv_DocumentAdv_Background) property of `DocumentAdv` class. The default value of this property is white.

N> 1. This property is independent for a document. So the background will change when the document is changed.
N> 2. To maintain same background for all documents, you can reset this property in DocumentChanged event.
N> 1. This API is supported starting from release version v17.4.0.39.
N> 2. This property is independent for a document. So the background will change when the document is changed.
N> 3. To maintain same background for all documents, you can reset this property in DocumentChanged event.

The following code illustrates how to apply color as background to the document pages.

Expand All @@ -121,12 +122,10 @@ richTextBoxAdv.Document.Background.Color = Color.FromRgb(102, 153, 204)

{% endtabs %}


Pages layout:
**Pages layout:**
![Changing Background color of Page Layout in WPF RichTextBox](Image_images/wpf-richtextbox-pages-background.PNG)

Continuous layout:
**Continuous layout:**
![Changing Background color of Continuous Layout in WPF RichTextBox](Image_images/wpf-richtextbox-continous-background.PNG)

N> This API is supported starting from release version v17.4.0.X.
You can also explore our [WPF RichTextBox example](https://github.com/syncfusion/docx-editor-sdk-wpf-demos) to knows how to render and configure the editing tools.
N> You can also explore our [WPF RichTextBox example](https://github.com/syncfusion/docx-editor-sdk-wpf-demos) to know how to render and configure the editing tools.
13 changes: 9 additions & 4 deletions Document-Processing/Word/Word-Processor/wpf/Clipboard.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Clipboard in WPF RichTextBox control | Syncfusion
description: Learn here all about Clipboard support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
description: Learn about the Clipboard support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
platform: document-processing
control: SfRichTextBoxAdv
documentation: ug
Expand All @@ -16,7 +16,7 @@ The [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor

* Image.

## UI Command to access clipboard operations
## UI Commands to Access Clipboard Operations


The following code example demonstrates how to bind commands for accessing clipboard operations.
Expand All @@ -33,5 +33,10 @@ The following code example demonstrates how to bind commands for accessing clipb
{% endhighlight %}

{% endtabs %}
N> In order to cut, copy or paste, the standard keyboard shortcuts such as CTRL + X, CTRL + C, CTRL + V can also be used.
You can refer to our [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor) feature tour page for its groundbreaking feature representations.You can also explore our [WPF RichTextBox example](https://github.com/syncfusion/docx-editor-sdk-wpf-demos) to knows how to render and configure the editing tools.

N> In order to cut, copy, or paste, the standard keyboard shortcuts such as CTRL+X, CTRL+C, and CTRL+V can also be used.

## See Also

- [WPF RichTextBox Feature Tour](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor)
- [WPF RichTextBox Examples](https://github.com/syncfusion/docx-editor-sdk-wpf-demos)
101 changes: 52 additions & 49 deletions Document-Processing/Word/Word-Processor/wpf/Commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Commands in WPF RichTextBox control | Syncfusion
description: Learn here all about Commands support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
description: Learn about the Commands support in the Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and how Commands can be used within the editor.
platform: document-processing
control: SfRichTextBoxAdv
documentation: ug
Expand Down Expand Up @@ -30,7 +30,7 @@ Commands are a way to handle user interface (UI) actions. They are a loosely cou

* Document Styles – Create, modify, apply and clear style.

## UI Command to access character formatting
## UI Command to Access Character Formatting


The following code example demonstrates how to bind commands for applying character format.
Expand All @@ -49,7 +49,7 @@ The following code example demonstrates how to bind commands for applying charac
The following code example demonstrates how to bind commands with parameter.
{% tabs %}
{% highlight xaml %}
<Button Content="Textalignment" Command="Syncfusion:SfRichTextBoxAdv.TextAlignmentCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="Right" />
<Button Content="Text Alignment" Command="RichTextBoxAdv:SfRichTextBoxAdv.TextAlignmentCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="Right" />
{% endhighlight %}
{% endtabs %}

Expand Down Expand Up @@ -83,6 +83,17 @@ The following table contains the list of available UI Commands in SfRichTextBoxA
</tr>
<tr>
<td>
<p>ApplyStyleCommand</p>
</td>
<td>
<p>Represents the command, which requests to apply style for the selected paragraph.</p>
</td>
<td>
<p>Name of the Style</p>
</td>
</tr>
<tr>
<td>
<p>AfterSpacingCommand</p>
</td>
<td>
Expand All @@ -105,6 +116,17 @@ The following table contains the list of available UI Commands in SfRichTextBoxA
</tr>
<tr>
<td>
<p>ClearFormattingCommand</p>
</td>
<td>
<p>Represents the command, which requests to remove formatting from the selected paragraph.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>BackSpaceKeyCommand</p>
</td>
<td>
Expand Down Expand Up @@ -658,7 +680,7 @@ The following table contains the list of available UI Commands in SfRichTextBoxA
<p>IgnoreAllSpellingErrorsCommand</p>
</td>
<td>
<p>Represents the command that ignores all the occurrence of a selected misspelled word.</p>
<p>Represents the command that ignores all the occurrences of a selected misspelled word.</p>
</td>
<td>
<p>The misspelled word to be ignored.</p>
Expand Down Expand Up @@ -1291,6 +1313,28 @@ The following table contains the list of available UI Commands in SfRichTextBoxA
</tr>
<tr>
<td>
<p>ShowStyleDialogCommand</p>
</td>
<td>
<p>Represents the command that shows the create style dialog.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>ShowStylesDialogCommand</p>
</td>
<td>
<p>Represents the command that shows the modify style dialog.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>ShowTableDialogCommand</p>
</td>
<td>
Expand Down Expand Up @@ -1454,51 +1498,10 @@ The {{'[TextAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Con
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>ShowStyleDialogCommand</p>
</td>
<td>
<p>Represents the command that shows the create style dialog.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>ShowStylesDialogCommand</p>
</td>
<td>
<p>Represents the command that shows the modify style dialog.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
<tr>
<td>
<p>ApplyStyleCommand</p>
</td>
<td>
<p>Represents the command, which requests to apply style for the selected paragraph.</p>
</td>
<td>
<p>Name of the Style</p>
</td>
</tr>
<tr>
<td>
<p>ClearFormattingCommand</p>
</td>
<td>
<p>Represents the command, which requests to remove formatting from the selected paragraph.</p>
</td>
<td>
<p>NA</p>
</td>
</tr>
</tbody>
</table>

N> You can refer to our [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor) feature tour page for its groundbreaking feature representations.You can also explore our [WPF RichTextBox example](https://github.com/syncfusion/docx-editor-sdk-wpf-demos) to knows how to render and configure the editing tools.
## See Also

- [WPF RichTextBox Feature Tour](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor)
- [WPF RichTextBox Examples](https://github.com/syncfusion/docx-editor-sdk-wpf-demos)
13 changes: 9 additions & 4 deletions Document-Processing/Word/Word-Processor/wpf/Comment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Comment in WPF RichTextBox control | Syncfusion
description: Learn here all about Comment support in Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and more.
description: Learn about the Comment support in the Syncfusion WPF RichTextBox (SfRichTextBoxAdv) control and how to work with Comments in Word documents.
platform: document-processing
control: SfRichTextBoxAdv
documentation: ug
Expand All @@ -13,7 +13,7 @@ A Comment is a note or annotation that an author or reviewer can add to the docu

N> Currently, the SfRichTextBoxAdv shows review pane only with Pages layout type.

## UI Commands for accessing comment
## UI Commands to Access Comments

The following operations can be performed through command binding in SfRichTextBoxAdv control:

Expand Down Expand Up @@ -51,8 +51,10 @@ The following code example demonstrates how to bind commands for accessing comme

## Customizing comment visual style

The SfRichTextBoxAdv provides event support to notify whenever a comment is added to the document. With the help of it, you can customize the visual style for the comment. You can also set the author and initial of the comment.
The SfRichTextBoxAdv provides event support to notify whenever a comment is added to the document. With the help of it, you can customize the visual style for the comment using the [`CommentVisualStyle`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.RichTextBoxAdv.CommentVisualStyle.html) class. You can also set the author and initial of the comment.

The following code example demonstrates how to customize comment visual style using event.

{% tabs %}
{% highlight c# %}
// Hooks the CommentAdding event of RichTextBoxAdv.
Expand Down Expand Up @@ -135,4 +137,7 @@ Dim isCommentPaneVisible As Boolean = richTextBoxAdv.EditorSettings.IsCommentPan
{% endhighlight %}
{% endtabs %}

N> You can refer to our [WPF RichTextBox](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor) feature tour page for its groundbreaking feature representations.You can also explore our [WPF RichTextBox example](https://github.com/syncfusion/docx-editor-sdk-wpf-demos) to knows how to render and configure the editing tools.
## See Also

- [WPF RichTextBox Feature Tour](https://www.syncfusion.com/docx-editor-sdk/wpf-docx-editor)
- [WPF RichTextBox Examples](https://github.com/syncfusion/docx-editor-sdk-wpf-demos)
Loading