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:
    Object
    MultipleBorders
    Derived
    PageBorders
    Implements
    IEnumerable
    Remarks

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

    Paragraph supports only Outside borders, Table supports Outside and Inside borders, and TableCell supports All.

    To programmatically 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
    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
    Double

    The border width in points.

    Remarks

    MultipleBorders class explicitly implements 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 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
    Object

    The Object to compare with this borders instance.

    Returns
    Boolean

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

    Overrides
    Object.Equals(Object)

    GetHashCode()

    Returns a hash code for this MultipleBorders instance.

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

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

    Overrides
    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
    Double

    The border width 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
    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
    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
    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.