skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ConnectionUtilities

Utilities and extension methods related to connections.

Inheritance
System.Object
ConnectionUtilities
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.WinControls.RadDiagram.dll

Syntax

public static class ConnectionUtilities

Methods

AllPoints(IConnection)

Returns all the points of this connection, i.e. the start and end points together with the intermediate connection points.

Declaration
public static IList<Point> AllPoints(this IConnection connection)
Parameters
IConnection connection

The connection.

Returns
System.Collections.Generic.IList<Point>

CalculateMiddlePointOfLine(Tuple<Point, Point>, IList<Point>)

Calculates the middle point of line.

Declaration
public static Point CalculateMiddlePointOfLine(Tuple<Point, Point> connectionEnds, IList<Point> connectionPoints)
Parameters
System.Tuple<Point, Point> connectionEnds

The connection end points.

System.Collections.Generic.IList<Point> connectionPoints

The points of interest (points where the line is curved/segmented).

Returns
Point

GetBezierDefaultHandlePoint(Point, Point, Point)

Gets the bezier default handle point.

Declaration
public static Point GetBezierDefaultHandlePoint(Point entryPoint, Point endPoint, Point connectorCenter)
Parameters
Point entryPoint

The entry point.

Point endPoint

The end point (opposite of the entryPoint ).

Point connectorCenter

The center of the connectors.

Returns
Point

GetBezierDefaultHandlePoint(Point, Point, Point, Double)

Gets the bezier default handle point.

Declaration
public static Point GetBezierDefaultHandlePoint(Point entryPoint, Point endPoint, Point connectorCenter, double bezierTension)
Parameters
Point entryPoint

The entry point.

Point endPoint

The end point.

Point connectorCenter

The connector center.

System.Double bezierTension

The bezier tension.

Returns
Point

GetConnectionEndPoints(IConnection, Boolean)

Gets the connection end points.

Declaration
public static Tuple<Point, Point> GetConnectionEndPoints(this IConnection connection, bool useConnectionCoordinates = false)
Parameters
IConnection connection

The connection.

System.Boolean useConnectionCoordinates

If set to true the points will be in global coordinates. If set to false, then the coordinates will be relative to the connection.

Returns
System.Tuple<Point, Point>

GetDefaultHandleBezierPoints(IConnection, Point, Point, Nullable<Point>, Nullable<Point>)

Gets the default handle bezier points.

Declaration
public static Tuple<Point, Point> GetDefaultHandleBezierPoints(this IConnection connection, Point startPoint, Point endPoint, Point? sourceConnectorCenter = default(Point? ), Point? targetConnectorCenter = default(Point? ))
Parameters
IConnection connection

The connection.

Point startPoint

The cached start point.

Point endPoint

The cached end point.

System.Nullable<Point> sourceConnectorCenter

The source connector center.

System.Nullable<Point> targetConnectorCenter

The target connector center.

Returns
System.Tuple<Point, Point>

SegmentCount(IConnection)

Returns the number of segments defined by the intermediate points.

Declaration
public static int SegmentCount(this IConnection conn)
Parameters
IConnection conn

The connection.

Returns
System.Int32

SetConnectionPoints(IConnection, IEnumerable<Point>)

Sets the connection points.

Declaration
public static void SetConnectionPoints(this IConnection connection, IEnumerable<Point> connectionPoints)
Parameters
IConnection connection

The connection.

System.Collections.Generic.IEnumerable<Point> connectionPoints

The connection points.

TranslateConnectionPoints(IConnection, Boolean)

Shifts the ConnectionPoints by adding or substracting the Position vector.

Declaration
public static IEnumerable<Point> TranslateConnectionPoints(this IConnection connection, bool globalCoordinates = true)
Parameters
IConnection connection

The connection. to shift.

System.Boolean globalCoordinates

If set to true points will be transformed to global coordinates. If set to false, then the coordinates will be relative to the connection.

Returns
System.Collections.Generic.IEnumerable<Point>

Remarks

The start/end points are not taken into account here.

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.