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.
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
Thanks for the NodeLayout example code, but except this , I want to show in my tree also properties that are not a collection.
for example - If A has a collection of B, and B has properties Value1,Value2,Collection1,Collection2 then the tree should look like:
A
-B
--Value1
--Value2
--Collection1
---I1
---..
--Collection2
---J1
etc.