Interface ICellBorders
Represent the borders and diagonal lines of a cell.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface ICellBorders
Properties
BorderBottom
Gets the bottom border of the cell. Read-only.
Declaration
ILineFormat BorderBottom { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border bottom of the cell, read only
ILineFormat borderBottom = cellBorders.BorderBottom;
//Set the begin arrow head length
borderBottom.BeginArrowheadLength = ArrowheadLength.Long;
//Set the dash style of border bottom
borderBottom.DashStyle = LineDashStyle.DashDotDot;
//Set the weight
borderBottom.Weight = 5;
//Save the presentation
presentation.Save("BorderBottom.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border bottom of the cell, read only
Dim borderBottom As ILineFormat = cellBorders.BorderBottom
'Set the begin arrow head length
borderBottom.BeginArrowheadLength = ArrowheadLength.[Long]
'Set the dash style of border bottom
borderBottom.DashStyle = LineDashStyle.DashDotDot
'Set the weight
borderBottom.Weight = 5
'Save the presentation
presentation__1.Save("BorderBottom.pptx")
'Close the presentation
presentation__1.Close()
BorderDiagonalDown
Gets the diagonal down border of the cell. Read-only.
Declaration
ILineFormat BorderDiagonalDown { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border diagonal down of the cell, read only
ILineFormat borderDiagonalDown = cellBorders.BorderDiagonalDown;
//Set the fill type of border diagonal down
borderDiagonalDown.Fill.FillType = FillType.Solid;
//Set the color for solid fill
borderDiagonalDown.Fill.SolidFill.Color = ColorObject.Navy;
//Save the presentation
presentation.Save("BorderDiagonalDown.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border diagonal down of the cell, read only
Dim borderDiagonalDown As ILineFormat = cellBorders.BorderDiagonalDown
'Set the fill type of border diagonal down
borderDiagonalDown.Fill.FillType = FillType.Solid
'Set the color for solid fill
borderDiagonalDown.Fill.SolidFill.Color = ColorObject.Navy
'Save the presentation
presentation__1.Save("BorderDiagonalDown.pptx")
'Close the presentation
presentation__1.Close()
BorderDiagonalUp
Gets the diagonal up border of the cell. Read-only.
Declaration
ILineFormat BorderDiagonalUp { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border diagonal up of the cell, read only
ILineFormat borderDiagonalUp = cellBorders.BorderDiagonalUp;
//Set the end arrow head style of border diagonal up
borderDiagonalUp.EndArrowheadStyle = ArrowheadStyle.ArrowOpen;
//Save the presentation
presentation.Save("BorderDiagonalUp.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border diagonal up of the cell, read only
Dim borderDiagonalUp As ILineFormat = cellBorders.BorderDiagonalUp
'Set the end arrow head style of border diagonal up
borderDiagonalUp.EndArrowheadStyle = ArrowheadStyle.ArrowOpen
'Save the presentation
presentation__1.Save("BorderDiagonalUp.pptx")
'Close the presentation
presentation__1.Close()
BorderLeft
Gets the left border of the cell. Read-only.
Declaration
ILineFormat BorderLeft { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border left of the cell, read only
ILineFormat borderLeft = cellBorders.BorderLeft;
//Set the end arrow head width
borderLeft.EndArrowheadWidth = ArrowheadWidth.Narrow;
//Set the cap style
borderLeft.CapStyle = LineCapStyle.Round;
//Save the presentation
presentation.Save("BorderLeft.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border left of the cell, read only
Dim borderLeft As ILineFormat = cellBorders.BorderLeft
'Set the end arrow head width
borderLeft.EndArrowheadWidth = ArrowheadWidth.Narrow
'Set the cap style
borderLeft.CapStyle = LineCapStyle.Round
'Save the presentation
presentation__1.Save("BorderLeft.pptx")
'Close the presentation
presentation__1.Close()
BorderRight
Gets the right border of the cell. Read-only.
Declaration
ILineFormat BorderRight { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border right of the cell, read only
ILineFormat borderRight = cellBorders.BorderRight;
//Set the end arrow head style of border right
borderRight.EndArrowheadStyle = ArrowheadStyle.ArrowStealth;
//Save the presentation
presentation.Save("BorderRight.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border right of the cell, read only
Dim borderRight As ILineFormat = cellBorders.BorderRight
'Set the end arrow head style of border right
borderRight.EndArrowheadStyle = ArrowheadStyle.ArrowStealth
'Save the presentation
presentation__1.Save("BorderRight.pptx")
'Close the presentation
presentation__1.Close()
BorderTop
Gets the top border of the cell. Read-only.
Declaration
ILineFormat BorderTop { get; }
Property Value
Type |
---|
ILineFormat |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200);
//Get the cell from a row in a table
ICell cell = table.Rows[0].Cells[0];
//Get the cell border properties
ICellBorders cellBorders = cell.CellBorders;
//Get the border top of the cell, read only
ILineFormat borderTop = cellBorders.BorderTop;
//Set the begin arrow head width of border top
borderTop.BeginArrowheadWidth = ArrowheadWidth.Wide;
//Set the line type of border top
borderTop.LineJoinType = LineJoinType.Miter;
//Save the presentation
presentation.Save("BorderTop.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(4, 3, 100, 120, 300, 200)
'Get the cell from a row in a table
Dim cell As ICell = table.Rows(0).Cells(0)
'Get the cell border properties
Dim cellBorders As ICellBorders = cell.CellBorders
'Get the border top of the cell, read only
Dim borderTop As ILineFormat = cellBorders.BorderTop
'Set the begin arrow head width of border top
borderTop.BeginArrowheadWidth = ArrowheadWidth.Wide
'Set the line type of border top
borderTop.LineJoinType = LineJoinType.Miter
'Save the presentation
presentation__1.Save("BorderTop.pptx")
'Close the presentation
presentation__1.Close()