Customizing and setting connectors of a Node

2 posts, 0 answers
  1. Jeremi
    Jeremi avatar
    11 posts
    Member since:
    May 2011

    Posted 15 Nov 2017 Link to this post

    I am using a ObservableGraphSourceBase with a fairly standard Link model and a  HierarchicalNodeViewModel as bases for my Diagram to display.

    Within my Diagram declaration in the XAML I am successfully using ShapeStyleSelector property to set the style of my Nodes as they are dropped or read into the diagram.

    I am looking for a way to remove and or add Connectors to the Nodes either from the Style via a Setter of some sort or somehow grammatically with a MVVM friendly method.


    I have tried from within the HierarchicalNodeView model but it does not have access to the resulting shape it seems. Also the ObservableGraphSourceBase does not seem to have access to the resulting RadDiagramShape which houses the Connectors list.


    Please help.

  2. Petar Mladenov
    Petar Mladenov avatar
    3058 posts

    Posted 16 Nov 2017 Link to this post

    Hello Jeremi,

    We are in a process of adding article in our documentation regarding custom connectors and MVVM RadDiagram. It will be live before R1 2018 in January.
    Till then, you can take a look at the following forum threads where some projects are also listed:

    Custom Connectors and MVVM

    Adding Custom Connectors in XAML style

    You can also vote for the following feature request:

    Diagram: Built-in support for MVVM connectors
    In addition to the projects, you can add string properties named, for example SourceConnectorPos, TargetConnectorPos in the Link model class. They can have default values of "Auto" and be bound to the SourceConnectorPosition and TargetConnectorPosition properties of the RadDiagramConnection via Style which applies to the connections. This way you have the ability to specify to which custom connector every connection attaches in the moment of creating the graph source. 

    Please let us know if you need any further assistance.

    Petar Mladenov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top