MultipleBorders Class
Represents a set of borders.
public class MultipleBorders : IEnumerable
Public Class MultipleBorders
Implements IEnumerable
- Inheritance:
- System.ObjectMultipleBorders
- Derived
Implements
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.
public SingleBorder this[SingleBorderType borderType] { get; }
Public ReadOnly Property Item(borderType As SingleBorderType) As SingleBorder
Parameters
borderType
- SingleBorderType
Type of the border.
Property Value
The SingleBorder for the specified SingleBorderType.
SupportedBorderTypes
Gets the supported border types.
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.
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.
ClearBorders(MultipleBorderTypes)
Clears the specified borders.
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.
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
GetHashCode()
Returns a hash code for this MultipleBorders instance.
Returns
- System.Int32
An integer value that specifies a hash value for this MultipleBorders instance.
Overrides
SetBorders(MultipleBorderTypes, BorderStyle, Color, Double)
Sets the specified borders.
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.
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.
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.
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.
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.