Interface IConnector
Represent the connector in presentation
Inherited Members
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IConnector : IShape, ISlideItem
Properties
BeginConnectedShape
Gets the begin connected shape instance IShape, if the connector begin point is connected. Read-only.
Declaration
IShape BeginConnectedShape { get; }
Property Value
Type |
---|
IShape |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Get the begin connected shape
IShape beginShape = connector.BeginConnectedShape;
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Get the begin connected shape
Dim beginShape As IShape = connector.BeginConnectedShape
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
BeginConnectionSiteIndex
Gets the begin connected site index, if the connector begin point is connected. Read-only.
Declaration
int BeginConnectionSiteIndex { get; }
Property Value
Type |
---|
System.Int32 |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Get the begin connected site index
int beginSiteIndex = connector.BeginConnectionSiteIndex;
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Get the begin connected site index
Dim beginSiteIndex As int = connector.BeginConnectionSiteIndex
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
EndConnectedShape
Gets the end connected shape instance IShape, if the connector end point is connected. Read-only.
Declaration
IShape EndConnectedShape { get; }
Property Value
Type |
---|
IShape |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Get the end connected shape
IShape endShape = connector.EndConnectedShape;
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Get the end connected shape
Dim endShape As IShape = connector.EndConnectedShape
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
EndConnectionSiteIndex
Gets the end connected site index, if the connector end point is connected. Read-only.
Declaration
int EndConnectionSiteIndex { get; }
Property Value
Type |
---|
System.Int32 |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Get the end connected site index
int endSiteIndex = connector.EndConnectionSiteIndex;
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Get the end connected site index
Dim endSiteIndex As int = connector.EndConnectionSiteIndex
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
Type
Gets or sets the type of IConnector instance.
Declaration
ConnectorType Type { get; set; }
Property Value
Type |
---|
ConnectorType |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 250, 250);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 200, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 3);
// Set the end connection
connector.EndConnect(oval, 3);
//Change the type of the connector
connector.Type = ConnectorType.Curve;
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 250, 250)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 200, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 3)
' Set the end connection
connector.EndConnect(oval, 3)
'Change the type of the connector
connector.Type = ConnectorType.Curve
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
Methods
BeginConnect(IShape, Int32)
Connect the begin portion of the connector with specified shape and site index
Declaration
void BeginConnect(IShape connectedShape, int connectionSiteIndex)
Parameters
Type | Name | Description |
---|---|---|
IShape | connectedShape | Represent the shape instance IShape that we want to connect with begin portion |
System.Int32 | connectionSiteIndex | Represent the site index of the specified shape to connnect with |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
BeginDisconnect()
Disconnect the begin connection of the connector
Declaration
void BeginDisconnect()
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
//Disconnect the begin connection of the connector
connector.BeginDisconnect();
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Disconnect the begin connection of the connector
connector.BeginDisconnect();
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
EndConnect(IShape, Int32)
Connect the end portion of the connector with specified shape and site index
Declaration
void EndConnect(IShape connectedShape, int connectionSiteIndex)
Parameters
Type | Name | Description |
---|---|---|
IShape | connectedShape | Represent the shape instance IShape that we want to connect with end portion |
System.Int32 | connectionSiteIndex | Represent the site index of the specified shape to connnect with |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
EndDisconnect()
Disconnect the end connection of the connector
Declaration
void EndDisconnect()
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
//Disconnect the end connection of the connector
connector.EndDisconnect();
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Disconnect the end connection of the connector
connector.EndDisconnect();
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close
Update()
Update the bounds of modified connector
Declaration
void Update()
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add a Rectangle shape on the slide
IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200);
// Add a Oval shape on the slide
IShape oval = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250);
// Add connector on the slide
IConnector connector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10);
// Set the begin connection
connector.BeginConnect(rectangle, 2);
// Set the end connection
connector.EndConnect(oval, 3);
//Update the bounds of inserted connector immediately
connector.Update();
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
' Create a new presentation.
Dim ppDoc As IPresentation = Presentation.Create()
' Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
' Add Rectangle shape on the slide
Dim rectangle As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 200, 300, 250, 200)
' Add Oval shape on the slide
Dim oval As IShape = slide.Shapes.AddShape(AutoShapeType.Oval, 600, 10, 250, 250)
' Add connector on the slide
Dim connector As IConnector = slide.Shapes.AddConnector(ConnectorType.Straight, 10, 10, 10, 10)
' Set the begin connection
connector.BeginConnect(rectangle, 2)
' Set the end connection
connector.EndConnect(oval, 3)
' Update the bounds of inserted connector immediately
connector.Update();
' Save the presentation file
ppDoc.Save("Sample.pptx")
' Close the presentation file
ppDoc.Close