MultipleBorders Class
Represents a set of borders.
public class MultipleBorders : IEnumerable
Public Class MultipleBorders
Implements IEnumerable
- Inheritance:
- MultipleBorders
- Derived
Implements
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.
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
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
- 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.
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 Object is equal to this MultipleBorders instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
Returns
true if the specified Object is a MultipleBorders and is equal to this MultipleBorders instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this MultipleBorders instance.
Returns
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
- Double
The border width 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
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
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
true if first
and second
borders are not equal; otherwise, false.