예제 #1
0
 private static void AppendDemoItems(ObservableCollection <object> root)
 {
     foreach (var i in DemoItem.CreateItems(2, null, root.Count))
     {
         root.Add(i);
     }
 }
예제 #2
0
        private static void AppendFirstContent(ObservableCollection <object> root)
        {
            var firstItem = root[0] as DemoItem;

            if (firstItem == null)
            {
                root[0] = firstItem = new DemoItem {
                    Label = "1"
                }
            }
            ;
            foreach (var childItem in DemoItem.CreateItems(1, firstItem, seed: 3, labelIndex: firstItem.Children.Count))
            {
                firstItem.Children.Add(childItem);
            }
        }
예제 #3
0
 private void ResetContent(object sender, RoutedEventArgs e)
 {
     ++_contentGeneration;
     DemoItem.Root  = DemoItem.CreateItems(2, null, _contentGeneration);
     DemoItem.Root2 = DemoItem.CreateItems(2, null, _contentGeneration);
 }