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
Wiki Markup
{description}
{excerpt}This class is represents background shading for text, table cells, etc.{excerpt}
{signature:C#}
 public sealed class Shading
{signature}{signature:vb.net}
Public NotInheritable Class Shading
{signature}
{remarks}MS Word equivalent: Format menu > Borders and Shading... > Shading tab

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

{remarks}
{example}{code:csharp|title=C#}

          WordApplication app = new WordApplication();
          Document doc = app.Create();
          Paragraph paragraph = doc.InsertParagraphAfter(null);
          Shading shad = paragraph.Formatting.Shading;
        {code}
{code:vb.net|title=vb.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
        {code}

{example}
{properties}
||Name||Description||
|[BackgroundColor|Shading.BackgroundColor]|{excerpt-include:Shading.BackgroundColor|nopanel=true}|
|[ForegroundColor|Shading.ForegroundColor]|{excerpt-include:Shading.ForegroundColor|nopanel=true}|
|[Pattern|Shading.Pattern]|{excerpt-include:Shading.Pattern|nopanel=true}|
{classes}
||Name||Description||
|[ShadingPattern|Shading.ShadingPattern]|{excerpt-include:Shading.ShadingPattern|nopanel=true}|