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
530
GlobalNodeLayouts
posted

Hello,

I'm not getting my desired result here. Assume you have a Person class that has two properties called SubOrdinates and Friends. Both properties are ObservableCollection with Person classes.

Now, how can I achieve an organisation chart where the SubOrdinates property is used, the depth is unknown and the Friends property is not used at all for rendering the org chart.

It seems that when using GlobalNodeLayout, the key (name of the property with child nodes) is ignored and all properties of Person types are used. I looked at the Hierarchical Node Layout, but there the depth must be known. Can the event NodeLayoutAssigned be used for this? How?

/Emil

Parents
No Data
Reply
  • 22015
    Verified Answer
    posted

    Hello Emil,

     I have been researching your issue and have created a small sample for you. In order not to show the Friends property, I handle the NodeControlAttachedEvent instead of NodeLayoutAssigned event.  Please find the attached sample and feel free to contact us if you have any further questions.

    XamOrgChart.zip
Children