Back to Devexpress

FactoryConnectorTool Class

corelibraries-devexpress-dot-diagram-dot-core-869a6448.md

latest2.4 KB
Original Source

FactoryConnectorTool Class

Allows you to create custom connector tools.

Namespace : DevExpress.Diagram.Core

Assembly : DevExpress.Diagram.v25.2.Core.dll

NuGet Package : DevExpress.Diagram.Core

Declaration

csharp
public class FactoryConnectorTool :
    ConnectorTool
vb
Public Class FactoryConnectorTool
    Inherits ConnectorTool

Remarks

The example below illustrates how to create a custom connector tool and use it as the Ribbon’s Connector tool.

Winforms:

csharp
diagramControl1.OptionsBehavior.ConnectorTool = new DevExpress.Diagram.Core.FactoryConnectorTool(
    "CurvedConnector",
    () => "CurvedConnector",
    diagram => new DiagramConnector() { Type = DevExpress.Diagram.Core.ConnectorType.Curved });
vb
diagramControl1.OptionsBehavior.ConnectorTool = New DevExpress.Diagram.Core.FactoryConnectorTool(
    "CurvedConnector",
    Function() "CurvedConnector",
    Function(diagram) New DiagramConnector() With {.Type = DevExpress.Diagram.Core.ConnectorType.Curved})

WPF:

csharp
diagram.ConnectorTool = new DevExpress.Diagram.Core.FactoryConnectorTool(
    "CurvedConnector",
    () => "CurvedConnector",
    diagram => new DiagramConnector() { Type = DevExpress.Diagram.Core.ConnectorType.Curved });
vb
diagram.ConnectorTool = New DevExpress.Diagram.Core.FactoryConnectorTool(
    "CurvedConnector",
    Function() "CurvedConnector",
    Function(diagram) New DiagramConnector() With {.Type = DevExpress.Diagram.Core.ConnectorType.Curved})

Inheritance

Object DevExpress.Utils.ImmutableObject DiagramTool DevExpress.Diagram.Core.ConnectorTool FactoryConnectorTool

See Also

FactoryConnectorTool Members

DevExpress.Diagram.Core Namespace