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
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.
Thanks for the example. It looks like it fixes my problem. I still think an easier way would be if the OrgChart would support setting a Key which specifies which property to look for when getting child nodes. Could you please forward this suggestion?
Best regards
Emil