Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

This class is represents background shading for text, table cells, etc.

Signature
C#
C#
<p> public sealed class Shading</p>
Signature
vb.net
vb.net
<p>Public NotInheritable Class Shading</p>
Remarks

MS Word equivalent: Format menu > Borders and Shading... > Shading tab

The following example demonstrates how to get the shading object of a paragraph.

Example
Code Block
csharp
csharp
titleC#

          WordApplication app = new WordApplication();
          Document doc = app.Create();
          Paragraph paragraph = doc.InsertParagraphAfter(null);
          Shading shad = paragraph.Formatting.Shading;
        
Code Block
vb.net
vb.net
titlevb.net

          Dim app As New WordApplication()
          Dim doc As Document = app.Create()
          Dim paragraph As Paragraph = doc.InsertParagraphAfter(Nothing)
          Dim shad As Shading = paragraph.Formatting.Shading
        
Properties

Name

Description

BackgroundColor

Excerpt Include
Shading.BackgroundColor
Shading.BackgroundColor
nopaneltrue

ForegroundColor

Excerpt Include
Shading.ForegroundColor
Shading.ForegroundColor
nopaneltrue

Pattern

Excerpt Include
Shading.Pattern
Shading.Pattern
nopaneltrue
Classes

Name

Description

ShadingPattern

Excerpt Include
Shading.ShadingPattern
Shading.ShadingPattern
nopaneltrue