Create HierarchicalDataTemplate Dynamically
===

I have these example code for binding TreeView:

    private List<Composite> GetData()
        {
            List<Composite> list = new List<Composite>()
            {
                new Composite
                {
                    Name = "1",
                    IsChecked = true,
                    Children = new List<Composite>()
                    {
                        new Composite 
                        {
                            Name = "1.1",
                            IsChecked = true,
                            Children = new List<Composite>()
                            {
                                new Composite
                                {
                                    Name = "1.1.1",
                                    IsChecked = false
                                }
                            }
                        },
                        new Composite
                        {
                            Name = "1.2",
                            IsChecked = false,
                            Children = new List<Composite>()
                            {
                                new Composite
                                {
                                    Name = "1.2.1",
                                    IsChecked = true
                                },
                                new Composite
                                {
                                    Name = "1.2.2",
                                    IsChecked = true
                                }
                            }
                        }
                    }
                },
                new Composite
                {
                    Name ="2",
                    IsChecked = false
                }
            };
            return list;
        }
Here is an image of this TreeView: [Here][1]

and the problem is, that I made it **manually**. But I want to create new nodes **dynamically** from database via **loop**.
Could u help me with an example, that create **List** dynamically? Thank you very much.


  [1]: http://www.2i.cz/d1bb85af7c