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

Sets or returns a boolean which specifies whether or not the border graphic is reversed.

Signature
C#
C#
 public boolean Reverse{ get; set; }
Signature
vb.net
vb.net
Public Property Reverse() As Boolean
Remarks

This only has an effect on certain line styles which are not symmetrical (for example, Border.LineStyle.ThinThickSmallGap). Reversing the right and bottom graphics of certain line styles can create a "3D" effect. CharacterRuns have only one border. Paragraphs have different border parts. For borders around characterRuns, Reverse tells you whether or not the right and bottom sides of the border have reversed graphics. For borders around paragraphs, it is necessary to explicitly reverse the right and bottom sides.

Reverse defaults to false which means that by default borders will appear "boxed".

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

Example
Code Block
csharp
csharp
titleC#

          //--- Get Reverse
          bool reverse = brdr.Reverse;

          //--- Set a 3D border around a character run
          Border brdr = charRun.Font.Border;
          brdr.Reverse = true;
          brdr.LineWidth = 12;
          brdr.Style = Border.LineStyle.ThinThickSmallGap;

          //--- Set a 3D border around a paragraph
          para.Formatting.GetBorder(Border.Location.Top).Style = Border.LineStyle.ThinThickSmallGap;
          para.Formatting.GetBorder(Border.Location.Top).LineWidth = 12;
          para.Formatting.GetBorder(Border.Location.Left).Style = Border.LineStyle.ThinThickSmallGap;
          para.Formatting.GetBorder(Border.Location.Left).LineWidth = 12;
          para.Formatting.GetBorder(Border.Location.Bottom).Style = Border.LineStyle.ThinThickSmallGap;
          para.Formatting.GetBorder(Border.Location.Bottom).LineWidth = 12;
          para.Formatting.GetBorder(Border.Location.Bottom).Reverse = true;
          para.Formatting.GetBorder(Border.Location.Right).Style = Border.LineStyle.ThinThickSmallGap;
          para.Formatting.GetBorder(Border.Location.Right).LineWidth = 12;
          para.Formatting.GetBorder(Border.Location.Right).Reverse = true;
        
Code Block
vb.net
vb.net
titlevb.net

          '--- Get Reverse
          Dim reverse As Boolean = brdr.Reverse

          '--- Set a 3D border around a character run
          Border brdr = charRun.Font.Border
          brdr.Reverse = True
          brdr.LineWidth = 12
          brdr.Style = Border.LineStyle.ThinThickSmallGap

          '--- Set a 3D border around a paragraph
          para.Formatting.GetBorder(Border.Location.Top).Style = Border.LineStyle.ThinThickSmallGap
          para.Formatting.GetBorder(Border.Location.Top).LineWidth = 12
          para.Formatting.GetBorder(Border.Location.Left).Style = Border.LineStyle.ThinThickSmallGap
          para.Formatting.GetBorder(Border.Location.Left).LineWidth = 12
          para.Formatting.GetBorder(Border.Location.Bottom).Style = Border.LineStyle.ThinThickSmallGap
          para.Formatting.GetBorder(Border.Location.Bottom).LineWidth = 12
          para.Formatting.GetBorder(Border.Location.Bottom).Reverse = True
          para.Formatting.GetBorder(Border.Location.Right).Style = Border.LineStyle.ThinThickSmallGap
          para.Formatting.GetBorder(Border.Location.Right).LineWidth = 12
          para.Formatting.GetBorder(Border.Location.Right).Reverse = True