GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    SingleBorder Struct

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a single border around a document element.

    • C#
    • VB.NET
    public struct SingleBorder : IEquatable<SingleBorder>
    Public Structure SingleBorder
        Implements IEquatable(Of SingleBorder)
    Implements
    System.IEquatable<SingleBorder>
    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.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public static readonly SingleBorder None
    Public Shared ReadOnly None As SingleBorder
    Field Value
    SingleBorder

    Properties

    Color

    Gets the border color.

    • C#
    • VB.NET
    public readonly Color Color { get; }
    Public ReadOnly Property Color As Color
    Property Value
    Color

    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.

    • C#
    • VB.NET
    public readonly double Space { get; }
    Public ReadOnly Property Space As Double
    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.

    • C#
    • VB.NET
    public readonly BorderStyle Style { get; }
    Public ReadOnly Property Style As BorderStyle
    Property Value
    BorderStyle

    The border style.

    Width

    Gets the border width in points.

    • C#
    • VB.NET
    public readonly double Width { get; }
    Public ReadOnly Property Width As Double
    Property Value
    System.Double

    The border width in points.

    Methods

    Equals(SingleBorder)

    Determines whether the other SingleBorder is equal to this SingleBorder instance.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    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
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this SingleBorder instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this SingleBorder instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this SingleBorder instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this SingleBorder instance.

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(SingleBorder, SingleBorder)

    Determines whether first and second SingleBorders are equal.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    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.

    Implements

    System.IEquatable<T>

    See Also

    MultipleBorders
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.