Spread WPF Documentation
BorderLineStyle Enumeration
Example Example 


GrapeCity.Windows.SpreadSheet.Data Namespace : BorderLineStyle Enumeration
Specifies the line drawing style for the border.
Syntax
'Declaration
 
Public Enum BorderLineStyle 
   Inherits System.Enum
'Usage
 
Dim instance As BorderLineStyle
public enum BorderLineStyle : System.Enum 
Members
MemberDescription
DashDotIndicates a border line with dash-dot.
DashDotDotIndicates a border line with dash-dot-dot.
DashedIndicates a border line with dashes.
DottedIndicates a border line with dots.
DoubleIndicates a double border line.
HairIndicates a border line with all dots.
MediumIndicates a medium border line with a solid line.
MediumDashDotIndicates a medium border line with dash-dot-dot.
MediumDashDotDotIndicates a medium border line with dash-dot-dot.
MediumDashedIndicates a medium border line with dashes.
NoneIndicates a border line without a style.
SlantedDashDotIndicates a slanted border line with dash-dot.
ThickIndicates a thick border line with a solid line.
ThinIndicates a border line with a solid thin line.
Example
This example uses the BorderLineStyle enumeration.
gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine();
gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
GrapeCity.Windows.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(2, 2, 2, 2);            
//gcSpreadSheet1.Sheets[0].SetBorder(r, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25,25,200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
gcSpreadSheet1.Sheets[0].Columns[5].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
gcSpreadSheet1.Sheets[0].Columns[5].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5));
gcSpreadSheet1.Sheets[0].Columns[5].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
gcSpreadSheet1.Sheets[0].Columns[5].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
gcSpreadSheet1.Sheets[0].Rows[5].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
gcSpreadSheet1.Sheets[0].Rows[5].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5));
gcSpreadSheet1.Sheets[0].Rows[5].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
gcSpreadSheet1.Sheets[0].Rows[5].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
gcSpreadSheet1.Invalidate();

private void button1_Click(object sender, RoutedEventArgs e)
        {
            listBox1.Items.Add(gcSpreadSheet1.Sheets[0].Cells[1, 1].ActualBorderBottom.ToString());
            gcSpreadSheet1.Sheets[0].Cells[1, 1].ResetBorderBottom();
            gcSpreadSheet1.Sheets[0].Cells[1, 1].ResetBorderLeft();
            gcSpreadSheet1.Sheets[0].Cells[1, 1].ResetBorderRight();
            gcSpreadSheet1.Sheets[0].Cells[1, 1].ResetBorderTop();
            gcSpreadSheet1.Invalidate();
        }
GcSpreadSheet1.Sheets(0).Cells(1, 1).BorderTop = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100))
GcSpreadSheet1.Sheets(0).Cells(1, 1).BorderLeft = New GrapeCity.Windows.SpreadSheet.Data.BorderLine()
GcSpreadSheet1.Sheets(0).Cells(1, 1).BorderRight = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot)
GcSpreadSheet1.Sheets(0).Cells(1, 1).BorderBottom = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200))
Dim r As New GrapeCity.Windows.SpreadSheet.Data.CellRange(2, 2, 2, 2)
 'GcSpreadSheet1.Sheets(0).SetBorder(r, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25,25,200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All)
GcSpreadSheet1.Sheets(0).SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All)
GcSpreadSheet1.Sheets(0).Columns(5).BorderTop = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100))
GcSpreadSheet1.Sheets(0).Columns(5).BorderLeft = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5))
GcSpreadSheet1.Sheets(0).Columns(5).BorderRight = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot)
GcSpreadSheet1.Sheets(0).Columns(5).BorderBottom = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200))
GcSpreadSheet1.Sheets(0).SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All)
GcSpreadSheet1.Sheets(0).Rows(5).BorderTop = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100))
GcSpreadSheet1.Sheets(0).Rows(5).BorderLeft = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5))
GcSpreadSheet1.Sheets(0).Rows(5).BorderRight = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot)
GcSpreadSheet1.Sheets(0).Rows(5).BorderBottom = New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200))
GcSpreadSheet1.Invalidate()

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
       ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).Cells(1, 1).ActualBorderBottom.ToString())
            GcSpreadSheet1.Sheets(0).Cells(1, 1).ResetBorderBottom()
            GcSpreadSheet1.Sheets(0).Cells(1, 1).ResetBorderLeft()
            GcSpreadSheet1.Sheets(0).Cells(1, 1).ResetBorderRight()
            GcSpreadSheet1.Sheets(0).Cells(1, 1).ResetBorderTop()
            GcSpreadSheet1.Invalidate()
    End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace