Interface ILineFormat
Represents the line and arrowhead formatting options.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface ILineFormat
Properties
BeginArrowheadLength
Gets or sets the length of the arrowhead at the beginning of the specified line.
Declaration
ArrowheadLength BeginArrowheadLength { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadLength | The length of the begin arrowhead. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the length of the beginning arrowhead of the line
lineFormat.BeginArrowheadLength = ArrowheadLength.Long;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the length of the beginning arrowhead of the line
lineFormat.BeginArrowheadLength = ArrowheadLength.[Long]
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
BeginArrowheadStyle
Gets or sets the style of the arrowhead at the beginning of the specified line.
Declaration
ArrowheadStyle BeginArrowheadStyle { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadStyle | The begin arrowhead style. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the style of the beginning arrowhead of the line
lineFormat.BeginArrowheadStyle = ArrowheadStyle.ArrowOval;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the style of the beginning arrowhead of the line
lineFormat.BeginArrowheadStyle = ArrowheadStyle.ArrowOval
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
BeginArrowheadWidth
Gets or sets the width of the arrowhead at the beginning of the specified line.
Declaration
ArrowheadWidth BeginArrowheadWidth { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadWidth | The width of the begin arrowhead. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the width of the beginning arrowhead of the line
lineFormat.BeginArrowheadWidth = ArrowheadWidth.Narrow;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the width of the beginning arrowhead of the line
lineFormat.BeginArrowheadWidth = ArrowheadWidth.Narrow
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
CapStyle
Gets or sets the line cap style.
Declaration
LineCapStyle CapStyle { get; set; }
Property Value
Type | Description |
---|---|
LineCapStyle | The cap style. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the line cap style
lineFormat.CapStyle = LineCapStyle.Flat;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the line cap style
lineFormat.CapStyle = LineCapStyle.Flat
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
DashStyle
Gets or sets the line dash style.
Declaration
LineDashStyle DashStyle { get; set; }
Property Value
Type | Description |
---|---|
LineDashStyle | The dash style. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the line dash style
lineFormat.DashStyle = LineDashStyle.DashLongDashDot;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the line dash style
lineFormat.DashStyle = LineDashStyle.DashLongDashDot
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
EndArrowheadLength
Gets or sets the length of the arrowhead at the end of the specified line.
Declaration
ArrowheadLength EndArrowheadLength { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadLength | The end length of the arrowhead. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the length of the end arrowhead of the line
lineFormat.EndArrowheadLength = ArrowheadLength.Medium;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the length of the end arrowhead of the line
lineFormat.EndArrowheadLength = ArrowheadLength.Medium
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
EndArrowheadStyle
Gets or sets the style of the arrowhead at the end of the specified line.
Declaration
ArrowheadStyle EndArrowheadStyle { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadStyle | The end arrowhead style. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the style of the end arrowhead of the line
lineFormat.EndArrowheadStyle = ArrowheadStyle.ArrowDiamond;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the style of the end arrowhead of the line
lineFormat.EndArrowheadStyle = ArrowheadStyle.ArrowDiamond
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
EndArrowheadWidth
Gets or sets the width of the arrowhead at the end of the specified line.
Declaration
ArrowheadWidth EndArrowheadWidth { get; set; }
Property Value
Type | Description |
---|---|
ArrowheadWidth | The end width of the arrowhead. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the width of the end arrowhead of the line
lineFormat.EndArrowheadWidth = ArrowheadWidth.Wide;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the width of the end arrowhead of the line
lineFormat.EndArrowheadWidth = ArrowheadWidth.Wide
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Fill
Gets an IFill instance that represents fill formatting options. Read-only.
Declaration
IFill Fill { get; }
Property Value
Type | Description |
---|---|
IFill | The fill. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Retrieve the fill of line format
IFill fill = lineFormat.Fill;
//Set the fill type of line
fill.FillType = FillType.Solid;
//Set the color for solid fill
fill.SolidFill.Color = ColorObject.DeepPink;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Retrieve the fill of line format
Dim fill As IFill = lineFormat.Fill
'Set the fill type of line
fill.FillType = FillType.Solid
'Set the color for solid fill
fill.SolidFill.Color = ColorObject.DeepPink
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
LineJoinType
Gets or sets line join type.
Declaration
LineJoinType LineJoinType { get; set; }
Property Value
Type | Description |
---|---|
LineJoinType | The type of the line join. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the line join type
lineFormat.LineJoinType = LineJoinType.Miter;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the line join type
lineFormat.LineJoinType = LineJoinType.Miter
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Style
Gets or set the line style.
Declaration
LineStyle Style { get; set; }
Property Value
Type | Description |
---|---|
LineStyle | The style. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the line style
lineFormat.Style = LineStyle.ThickThin;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the line style
lineFormat.Style = LineStyle.ThickThin
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Weight
Gets or set the line weight, in points. The range of Weight is from 0 to 1584.
Declaration
double Weight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The weight. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance of line format from shape
ILineFormat lineFormat = shape.LineFormat;
//Set the weight
lineFormat.Weight = 17;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance of line format from shape
Dim lineFormat As ILineFormat = shape.LineFormat
'Set the weight
lineFormat.Weight = 17
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()