skip navigation
  • Product Bundles

    DevCraft

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

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue 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 Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    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 Edge<TNodeData, TLinkData>

Generic implementation of the IEdge<TNode, TLink> interface.

Inheritance
System.Object
Edge<TNodeData, TLinkData>
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll

Syntax

public class Edge<TNodeData, TLinkData> : Object, IEdge<Node<TNodeData, TLinkData>, Edge<TNodeData, TLinkData>> where TNodeData : new()
    where TLinkData : new()
Type Parameters
TNodeData

TLinkData

Constructors

Edge()

Initializes a new instance of the Edge<TNodeData, TLinkData> class.

Declaration
public Edge()

Edge(IConnection)

Initializes a new instance of the Edge<TNodeData, TLinkData> class.

Declaration
public Edge(IConnection connection)
Parameters
IConnection connection

The connection on which this link is based.

Properties

Connection

Gets the associated IConnection object. If this is a virtual edge this connection is null.

Declaration
public IConnection Connection { get; }
Property Value
IConnection

Id

Gets or sets identifier.

Declaration
public int Id { get; set; }
Property Value
System.Int32

Implements
IEdge<TNode, TLink>.Id

IsDirected

Gets or sets whether there is an intrinsic direction. If not, this means the edge can be traversed in both directions.

Declaration
public bool IsDirected { get; set; }
Property Value
System.Boolean

IsReversed

Gets whether link has been reversed (using the Reverse() method).

Declaration
public bool IsReversed { get; }
Property Value
System.Boolean

IsVirtual

Gets whether this edge represents a logical link rather than one derived from a single connection. For instance, a virtual edge is necessary when multiple connections exist between containers and the working graph needs a single edge for the layout process.

Declaration
public bool IsVirtual { get; }
Property Value
System.Boolean

NumberOfVirtualNodes

Gets or sets the number of virtual nodes which have been inserted during the process of breaking layer-crossing links. This is specific to the Sugiyama layout.

Declaration
public int NumberOfVirtualNodes { get; set; }
Property Value
System.Int32

Points

Gets or sets the points defining the link.

Declaration
public IList<Point> Points { get; set; }
Property Value
System.Collections.Generic.IList<System.Windows.Point>

Remarks

This also defines eventually the IConnection visual if it's a polyline or some other multi-point visual.

PropertyBag

Gets or sets the dictionary of runtime/layout properties.

Declaration
public Dictionary<object, object> PropertyBag { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.Object, System.Object>

SegmentIndex

Gets or sets index of the segment.

Declaration
public int SegmentIndex { get; set; }
Property Value
System.Int32

Sink

Gets the destination (target, end) node of this link.

Declaration
public Node<TNodeData, TLinkData> Sink { get; set; }
Property Value
Node<TNodeData, TLinkData>

Implements
IEdge<TNode, TLink>.Sink

Source

Gets the source (origin, start) node of this link.

Declaration
public Node<TNodeData, TLinkData> Source { get; set; }
Property Value
Node<TNodeData, TLinkData>

Implements
IEdge<TNode, TLink>.Source

Weight

Gets the weight of this link.

Declaration
public double Weight { get; set; }
Property Value
System.Double

Implements
IEdge<TNode, TLink>.Weight

Methods

Clone()

Returns a (shallow) clone of this link.

Declaration
public Edge<TNodeData, TLinkData> Clone()
Returns
Edge<TNodeData, TLinkData>

A clone of this link.

Implements
IEdge<TNode, TLink>.Clone()
Remarks

The following properties are being cloned:

  • The identifier (Id)
  • The weight (Weight)
  • The segment index (SegmentIndex)
  • The points (Points).

GetBounds()

Gets the bounding rectangle of this entity.

Declaration
public Rect GetBounds()
Returns
System.Windows.Rect

GetComplementaryNode(INode<Node<TNodeData, TLinkData>, Edge<TNodeData, TLinkData>>)

Returns the opposite or complementary node of the given one.

Declaration
public Node<TNodeData, TLinkData> GetComplementaryNode(INode<Node<TNodeData, TLinkData>, Edge<TNodeData, TLinkData>> node)
Parameters
INode<Node<TNodeData, TLinkData>, Edge<TNodeData, TLinkData>> node

The node whose complement is looked for.

Returns
Node<TNodeData, TLinkData>

null if the node is not part of this link, otherwise the opposite or complementary node with respect to this link.

Implements
IEdge<TNode, TLink>.GetComplementaryNode(INode<TNode, TLink>)

GetOppositeNode(Node<TNodeData, TLinkData>)

Returns the node at the opposite end of the link.

Declaration
public Node<TNodeData, TLinkData> GetOppositeNode(Node<TNodeData, TLinkData> node)
Parameters
Node<TNodeData, TLinkData> node

The a Node.

Returns
Node<TNodeData, TLinkData>

Reverse()

Reverses the direction of this link.

Declaration
public void Reverse()
Implements
IEdge<TNode, TLink>.Reverse()

SetPoints(IEnumerable<Point>)

Sets the control points (Points) of this link.

Declaration
public void SetPoints(IEnumerable<Point> points)
Parameters
System.Collections.Generic.IEnumerable<System.Windows.Point> points

The points defining this link.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
GraphExtensions.MoveLink<TNodeData, TLinkData>(Edge<TNodeData, TLinkData>, Point)
EnumerableExtensions.ToEnumerable<T>(T)

See Also

Node<TNodeData, TLinkData>
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML 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.