officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-dot-setpagebackground-x28-system-dot-drawing-dot-color-system-dot-boolean-x29.md
Sets the background color of the page and specifies whether it is shown.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
void SetPageBackground(
Color pageBackColor,
bool showPageBackground
)
Sub SetPageBackground(
pageBackColor As Color,
showPageBackground As Boolean
)
| Name | Type | Description |
|---|---|---|
| pageBackColor | Color |
A Color structure specifying the color.
| | showPageBackground | Boolean |
true to show the specified background color; otherwise, false.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetPageBackground(Color, Boolean) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
{
CurrentCodeEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
CurrentCodeClassEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
winforms-richedit-document-api/CS/RichEditAPISample/CodeUtils/ExampleCodeEditor.cs#L129
{
CurrentCodeEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
CurrentCodeClassEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeUtils/ExampleCodeEditor.cs#L131
{
CurrentCodeEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
CurrentCodeClassEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
void UpdatePageBackground(bool codeEvaluated) {
CurrentCodeEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
}
{
CurrentCodeEditor.Document.SetPageBackground((codeEvaluated) ? DXColor.Empty : DXColor.FromArgb(0xFF, 0xBC, 0xC8), true);
}
Private Sub UpdatePageBackground(ByVal codeEvaluated As Boolean)
CurrentCodeEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
CurrentCodeClassEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
winforms-richedit-document-api/VB/RichEditAPISample/CodeUtils/ExampleCodeEditor.vb#L127
Private Sub UpdatePageBackground(ByVal codeEvaluated As Boolean)
CurrentCodeEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
CurrentCodeClassEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeUtils/ExampleCodeEditor.vb#L125
Private Sub UpdatePageBackground(ByVal codeEvaluated As Boolean)
CurrentCodeEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
CurrentCodeClassEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
Private Sub UpdatePageBackground(ByVal codeEvaluated As Boolean)
CurrentCodeEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
End Sub
Private Sub UpdatePageBackground(ByVal codeEvaluated As Boolean)
CurrentCodeEditor.Document.SetPageBackground(If(codeEvaluated, DXColor.Empty, DXColor.FromArgb(&HFF, &HBC, &HC8)), True)
End Sub
See Also