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
610
Bind tree to some class with regular properties and collection properties
posted

Hi,

I want to view in xamtreeview regular class.

Lets take for example these class:

public class A

{

   public ObservableCollection<B> Items { get; set; }

}

public class B

{

   public class C { get; set; }

   public class D { get; set; }

   public class IgnoreClass { get; set; }

}

public class C

{

   public ObservalbeCollection<E> Items { get; set; }

}

 

inside each B class there should be 2 fields,

the Fisrt is C - with Items inside it ('Items' field in C class),

and the Second is just an item (D class), with no childrens.

 

How can I Bind the user controll to this type of class (class A), and by adding Nodes Layouts - show this tree structure.

 

Thanks,

Guy.

Parents
  • 6759
    Offline posted

    Hi Guy,

    you need to use add few NodeLayouts in the GlobalNodeLayouts. I've done a sample illustrating the approach in general. I got a little lost how you want the tree to look like after the class B nodes. Could you elaborate more what the children of a B item should look like and how the hierarchy should continue?

    You could modify the attached sample to illustrate the goal you're trying to achieve.

    You could check out the Configuring Node Layouts help page. Here's also the landing page of XamDataTree help

    XamDataTree_Binding.zip
Reply Children