示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            ChecksModel model = new ChecksModel("Main");
            ChecksModel m1    = new ChecksModel("Branch");

            m1.AddChild(new ChecksModel("1st"));
            m1.AddChild(new ChecksModel("2nd"));
            model.AddChild(m1);
            model.AddChild(new ChecksModel("3rd"));
            model.AddChild(new ChecksModel("4th"));

            DataContext = model;
        }
示例#2
0
 public void AddChild(ChecksModel child)
 {
     Children.Add(child);
 }