Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1405
Custom XamDiagram Representation
posted

Hi,

I need a representation as attached. The below link fulfills half of my requirement.

http://help.infragistics.com/Help/Doc/WPF/2014.2/CLR4.0/html/xamDiagram_Binding_to_Hierarchical_Node_Data_with_References.html

My Implementation has below class structure:

public class Employee : INotifyPropertyChanged

{

private string _name;

public string Name { get { return _name; } set { _name = value; OnPropertyChanged("Name"); } }

private ObservableCollection<Employee> subordinates;

public ObservableCollection<Employee> Subordinates { get { return subordinates; } set { subordinates = value; } }

public event PropertyChangedEventHandler PropertyChanged;

protected void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); }

}

I'm not able to make the lower portion of the image (nodes linked to each other from left to right). The representation should flow from Left to Right.

Can anyone please help me in this.

Note: I'm using XamDiagram 14.2. You can assume, that I'm able to add XamDiagram and playaround it.

Parents
  • 16495
    Verified Answer
    Offline posted

    Hello Varun ,

     

    Thank you for your post.

     

    I have been looking into it and the image that you have provided. I am not sure that I understand correctly your requirements. I assume that you want to use the TreeLayout of XamDiagram. I created a short sample application based on your scenario to show you how you ca achieve it. In the sample I used your data structure and created TreeDiagramLayout by using NodeDefinitions and ConnectionDefinitions. You can see more samples about TreeLayout in XamDiagram from our  WPF Samples Browser under the tag -> XamDiagram -> Organization -> TreeLayout.

     

    Please let me know if you need any further assistance on the matter

    Representation.zip
Reply Children