

'Declaration<DefaultMemberAttribute("Item")> Public Class BorderCollection Inherits Xceed.Workbooks.NET.StyleBase(Of BorderCollection)
'UsageDim instance As BorderCollection
[DefaultMember("Item")] public class BorderCollection : Xceed.Workbooks.NET.StyleBase<BorderCollection>
using( var workbook = Workbook.Create( "AddBorder.xlsx" ) ) { // Gets the first Worksheet; a Workbook always contains at least 1 Worksheet. var worksheet = workbook.Worksheets[ 0 ]; // Gets the Border collection for Cell A2. var borders = worksheet.Cells[ "A2" ].Style.Borders; // Sets the color and style of the rightmost Border. borders[ BorderType.Right ].Style = LineStyle.Thick; borders[ BorderType.Right ].Color = Color.Red; // Saves Workbook to disk; workbook.Save(); }
System.Object
Xceed.Workbooks.NET.StyleBase<T>
Xceed.Workbooks.NET.BorderCollection
| Name | Description | |
|---|---|---|
![]() | Item | Gets or sets a specific Border in the BorderCollection. |
| Name | Description | |
|---|---|---|
![]() | Equals | Determines whether the specified System.Object is equal to the current System.Object. |
![]() | GetHashCode | Serves as a hash function for a particular type. |
![]() | SetDiagonals | Sets the DiagonalUp and DiagonalDown Borders using the same LineStyle and Color. |
![]() | SetInside | Sets the Horizontal and Vertical Borders using the same LineStyle and Color. |
![]() | SetOutline | Sets the Left, Right, Top and Bottom Borders using the same LineStyle and Color. |
![]() | SetThemeDiagonals | Sets the DiagonalUp and DiagonalDown Borders using the same LineStyle and ThemeColor. |
![]() | SetThemeInside | Sets the Horizontal and Vertical Borders using the same LineStyle and ThemeColor. |
![]() | SetThemeOutline | Sets the Left, Right, Top and Bottom Borders using the same LineStyle and ThemeColor. |
| Name | Description | |
|---|---|---|
![]() | OnPropertyChanged | (Inherited from Xceed.Workbooks.NET.StyleBase<BorderCollection>) |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.