MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Styles > Borders |
You can use four types of borders in cells. In the designer, you can use the context menu of the cell or click on the Cell.Style.Border property in the Properties window to display the Border dialog.
By default, the borders that are set on the cells are silver lines on all four sides of the cells. This setting has been inherited from the Template.Style.Border property.
If you use the Border class, you can draw borders on all four sides of the cells. The borders can be set on either or all of the four sides, running from one corner to the other. You can also set color and style for each side.
This example sets the style border.
Imports GrapeCity.Win.MultiRow GcMultiRow1.Rows(0).Cells(0).Style.Border = New Border(LineStyle.Double, Color.Red) |
using GrapeCity.Win.MultiRow; gcMultiRow1.Rows[0].Cells[0].Style.Border = new Border(LineStyle.Double, Color.Red); |
You can draw borders with 3D effects if you use the ThreeDBorder class. The border is displayed on all four sides, enabling 3D display through usage of light and shadow.
This example sets a 3D border.
Imports GrapeCity.Win.MultiRow GcMultiRow1.Rows(0).Cells(0).Style.Border = New ThreeDBorder(ThreeDEffect.Sunken) |
using GrapeCity.Win.MultiRow; gcMultiRow1.Rows[0].Cells[0].Style.Border = new ThreeDBorder(ThreeDEffect.Sunken); |
You can draw a rounded border if you use the RoundedBorder class. You can specify the border color and style for the four sides and four corners. You can also specify the angle of the rounded corner and whether anti-alias should be applied.
This example creates a rounded border.
Imports GrapeCity.Win.MultiRow GcMultiRow1.Rows(0).Cells(0).Style.Border = New RoundedBorder(LineStyle.Double, Color.Red, 0.25F) |
using GrapeCity.Win.MultiRow; gcMultiRow1.Rows[0].Cells[0].Style.Border = new RoundedBorder(LineStyle.Double, Color.Red, 0.25f); |
When no borders have been set, the style gets inherited from the one above. Refer to Rules for Applying Styles for details on the inheritance rules.