Syncfusion.XlsIO.Base
Example 


Line Property (IShape)

Represents line format properties. Read-only.
Syntax
'Declaration
 
ReadOnly Property Line As IShapeLineFormat
'Usage
 
Dim instance As IShape
Dim value As IShapeLineFormat
 
value = instance.Line
IShapeLineFormat Line {get;}
Example
The following code illustrates how to access Line property.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shape
            IShape shape = worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 40, 100);
            
            //Set line format
            IShapeLineFormat lineFormat = shape.Line;
            
            //Set line color
            lineFormat.ForeColorIndex = ExcelKnownColors.Red;
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.47

See Also