Setting Borders and Gridlines
Spread WinRT Documentation > Developer's Guide > Customizing the Appearance > Setting Borders and Gridlines

You can set the color or line style of the border around the cells, columns, or rows. You can also specify the color and whether to show grid lines. Use the SetBorder method to set a border. The ShowGridLine and GridLineColor properties can be used to make changes to the horizontal and vertical grid lines in the control.

The following image displays a border around a cell range.

Using Code

This example creates a border.

CS
Copy Code
GrapeCity.Xaml.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(1, 1, 2, 2);
gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Blue), GrapeCity.Xaml.SpreadSheet.Data.SetBorderOptions.All);
VB
Copy Code
Dim r As New GrapeCity.Xaml.SpreadSheet.Data.CellRange(2, 2, 2, 2)
GcSpreadSheet1.Sheets(0).SetBorder(r, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Blue), GrapeCity.Xaml.SpreadSheet.Data.SetBorderOptions.All)
See Also