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

    Show / Hide Table of Contents

    MultipleBorders Class

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

    Represents a set of borders.

    • C#
    • VB.NET
    public class MultipleBorders : IEnumerable
    Public Class MultipleBorders
        Implements IEnumerable
    Inheritance:
    System.Object
    MultipleBorders
    Derived
    PageBorders
    Implements
    System.Collections.IEnumerable
    Remarks

    MultipleBorders class is used to set borders for Paragraph, Table and TableCell elements.

    To enumerate through all supported border types, use SupportedBorderTypes property.

    Properties

    Item[SingleBorderType]

    Gets the SingleBorder for the specified SingleBorderType.

    • C#
    • VB.NET
    public SingleBorder this[SingleBorderType borderType] { get; }
    Public ReadOnly Property Item(borderType As SingleBorderType) As SingleBorder
    Parameters
    borderType
    SingleBorderType

    Type of the border.

    Property Value
    SingleBorder

    The SingleBorder for the specified SingleBorderType.

    SupportedBorderTypes

    Gets the supported border types.

    • C#
    • VB.NET
    public IEnumerable<SingleBorderType> SupportedBorderTypes { get; }
    Public ReadOnly Property SupportedBorderTypes As IEnumerable(Of SingleBorderType)
    Property Value
    System.Collections.Generic.IEnumerable<SingleBorderType>

    The supported border types.

    Methods

    Add(MultipleBorderTypes, BorderStyle, Color, Double)

    Sets the specified borders. This method is required to support C# collection initializer syntax and redirects its call to the SetBorders(MultipleBorderTypes, BorderStyle, Color, Double) method.

    • C#
    • VB.NET
    public void Add(MultipleBorderTypes borderTypes, BorderStyle borderStyle, Color borderColor, double borderWidth)
    Public Sub Add(borderTypes As MultipleBorderTypes, borderStyle As BorderStyle, borderColor As Color, borderWidth As Double)
    Parameters
    borderTypes
    MultipleBorderTypes

    The border types to set.

    borderStyle
    BorderStyle

    The border style.

    borderColor
    Color

    The border color.

    borderWidth
    System.Double

    The border width in points.

    Remarks

    MultipleBorders class explicitly implements System.Collections.IEnumerable and contains public method Add(MultipleBorderTypes, BorderStyle, Color, Double) so it can be initialized using the C# collection initializer syntax like in the following example.

    ClearBorders()

    Clears all borders.

    • C#
    • VB.NET
    public void ClearBorders()
    Public Sub ClearBorders

    ClearBorders(MultipleBorderTypes)

    Clears the specified borders.

    • C#
    • VB.NET
    public void ClearBorders(MultipleBorderTypes borderTypes)
    Public Sub ClearBorders(borderTypes As MultipleBorderTypes)
    Parameters
    borderTypes
    MultipleBorderTypes

    The border types to clear.

    Equals(Object)

    Determines whether the specified System.Object is equal to this MultipleBorders 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 borders instance.

    Returns
    System.Boolean

    true if the specified System.Object is a MultipleBorders and is equal to this MultipleBorders instance; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this MultipleBorders 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 MultipleBorders instance.

    Overrides
    System.Object.GetHashCode()

    SetBorders(MultipleBorderTypes, BorderStyle, Color, Double)

    Sets the specified borders.

    • C#
    • VB.NET
    public void SetBorders(MultipleBorderTypes borderTypes, BorderStyle borderStyle, Color borderColor, double borderWidth)
    Public Sub SetBorders(borderTypes As MultipleBorderTypes, borderStyle As BorderStyle, borderColor As Color, borderWidth As Double)
    Parameters
    borderTypes
    MultipleBorderTypes

    The border types to set.

    borderStyle
    BorderStyle

    The border style.

    borderColor
    Color

    The border color.

    borderWidth
    System.Double

    The border width in points.

    SetBorders(MultipleBorderTypes, BorderStyle, Color, Double, Double)

    Sets the specified borders.

    • C#
    • VB.NET
    public void SetBorders(MultipleBorderTypes borderTypes, BorderStyle borderStyle, Color borderColor, double borderWidth, double borderSpace)
    Public Sub SetBorders(borderTypes As MultipleBorderTypes, borderStyle As BorderStyle, borderColor As Color, borderWidth As Double, borderSpace As Double)
    Parameters
    borderTypes
    MultipleBorderTypes

    The border types to set.

    borderStyle
    BorderStyle

    The border style.

    borderColor
    Color

    The border color.

    borderWidth
    System.Double

    The border width in points.

    borderSpace
    System.Double

    the border spacing offset in points.

    ToSingleBorderTypes(MultipleBorderTypes)

    Converts a MultipleBorderTypes flags enumeration to a sequence of SingleBorderType enumeration.

    • C#
    • VB.NET
    public static IEnumerable<SingleBorderType> ToSingleBorderTypes(MultipleBorderTypes borderTypes)
    Public Shared Function ToSingleBorderTypes(borderTypes As MultipleBorderTypes) As IEnumerable(Of SingleBorderType)
    Parameters
    borderTypes
    MultipleBorderTypes

    A MultipleBorderTypes flags enumeration.

    Returns
    System.Collections.Generic.IEnumerable<SingleBorderType>

    A sequence of SingleBorderType enumeration.

    Operators

    Equality(MultipleBorders, MultipleBorders)

    Determines whether first and second MultipleBorderss are equal.

    • C#
    • VB.NET
    public static bool operator ==(MultipleBorders first, MultipleBorders second)
    Public Shared Operator =(first As MultipleBorders, second As MultipleBorders) As Boolean
    Parameters
    first
    MultipleBorders

    The first borders.

    second
    MultipleBorders

    The second borders.

    Returns
    System.Boolean

    true if first and second borders are equal; otherwise, false.

    Inequality(MultipleBorders, MultipleBorders)

    Determines whether first and second MultipleBorderss are not equal.

    • C#
    • VB.NET
    public static bool operator !=(MultipleBorders first, MultipleBorders second)
    Public Shared Operator <>(first As MultipleBorders, second As MultipleBorders) As Boolean
    Parameters
    first
    MultipleBorders

    The first borders.

    second
    MultipleBorders

    The second borders.

    Returns
    System.Boolean

    true if first and second borders are not equal; otherwise, false.

    Implements

    System.Collections.IEnumerable

    See Also

    SingleBorder
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.