SingleBorder Struct
Represents a single border around a document element.
public struct SingleBorder : IEquatable<SingleBorder>
Public Structure SingleBorder
Implements IEquatable(Of SingleBorder)
Implements
Remarks
SingleBorder defines a border line pattern style, color and width for a single border around an element. SingleBorder is only directly used in a Border property, otherwise it is contained in a Borders, Borders or Borders properties.
Constructors
SingleBorder(BorderStyle, Color, Double)
Initializes a new instance of the SingleBorder struct.
public SingleBorder(BorderStyle style, Color color, double width)
Public Sub New(style As BorderStyle, color As Color, width As Double)
Parameters
style
- BorderStyle
The border style.
color
- Color
The border color.
width
- System.Double
The border width in points.
Fields
None
Value that represents that there is no border.
Field Value
Properties
Color
Gets the border color.
Property Value
The border color.
Space
Gets the spacing offset (in points) that shall be used to place this border on the parent object. Supported in DOCX and DOC formats. Supported in PDF format on PageBorders and paragraph Borders.
When a document has a page border that is relative to the page edges (using a value of true in the MeasureFromEdgeOfPage on PageBorders), it shall specify the distance between the edge of the page and the beginning of this border in points.
When a document has a page border that is relative to the text extents (using a value of true in the MeasureFromEdgeOfPage on PageBorders), it shall specify the distance between the PageMargins and the beginning of this border in points.
Property Value
- System.Double
The spacing offset that shall be used to place this border on the parent object.
Remarks
This value is currently ignored when exporting a document to PDF, XPS, or image formats if specified on a non-page or a non-paragraph border.
Style
Gets the border style.
Property Value
The border style.
Width
Gets the border width in points.
Property Value
- System.Double
The border width in points.
Methods
Equals(SingleBorder)
Determines whether the other
SingleBorder is equal to this SingleBorder instance.
public bool Equals(SingleBorder other)
Public Function Equals(other As SingleBorder) As Boolean
Parameters
other
- SingleBorder
The other border to compare with this border instance.
Returns
- System.Boolean
true if the other
SingleBorder is equal to this SingleBorder instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this SingleBorder instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this border instance.
Returns
- System.Boolean
true if the specified System.Object is a SingleBorder and is equal to this SingleBorder instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this SingleBorder instance.
Returns
- System.Int32
An integer value that specifies a hash value for this SingleBorder instance.
Overrides
ToString()
Returns a System.String that represents this SingleBorder instance.
Returns
- System.String
A System.String that represents this SingleBorder instance.
Overrides
Operators
Equality(SingleBorder, SingleBorder)
Determines whether first
and second
SingleBorders are equal.
public static bool operator ==(SingleBorder first, SingleBorder second)
Public Shared Operator =(first As SingleBorder, second As SingleBorder) As Boolean
Parameters
first
- SingleBorder
The first border.
second
- SingleBorder
The second border.
Returns
- System.Boolean
true if first
and second
borders are equal; otherwise, false.
Inequality(SingleBorder, SingleBorder)
Determines whether first
and second
SingleBorders are not equal.
public static bool operator !=(SingleBorder first, SingleBorder second)
Public Shared Operator <>(first As SingleBorder, second As SingleBorder) As Boolean
Parameters
first
- SingleBorder
The first border.
second
- SingleBorder
The second border.
Returns
- System.Boolean
true if first
and second
borders are not equal; otherwise, false.