开发者

I need a ObservableCollection of tree levels

i need to create a ObservableCollection<> for tree o more levels in c# like this:

thanks in advance,

Timmy Leonard


make a "node" class that contains an observable collection of child nodes, like this:

class node
{
// add some data properties in here, too

   public ObservableCollection<node> children;
}


// declare an instance, in the data model (or where-ever)
ObservableCollection<node> RootLevel = new ObservableCollection<node>();

I could probably give you a better answer if I knew what platform your trying to do this for. (WPF or Silverlight, etc)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜