Inheritance: System.Windows.Controls.TreeView
        public ShowClassHierarchy()
        {
            Title = "Show Class Hierarchy";

            ClassHierarchyTreeView tree = new ClassHierarchyTreeView(typeof(System.Windows.Threading.DispatcherObject));
            Content = tree;
        }
Example #2
0
        public ShowClassHierarchy()
        {
            Title = "Show Class Hierarchy";

            ClassHierarchyTreeView tree = new ClassHierarchyTreeView(typeof(System.Windows.Threading.DispatcherObject));

            Content = tree;
        }
        public ExploreDependencyProperties()
        {
            Title = "Explore Dependency Properties";

            // Create Grid as content of window.
            Grid grid = new Grid();
            Content = grid;

            // Three column definitions for Grid.
            ColumnDefinition col = new ColumnDefinition();
            col.Width = new GridLength(1, GridUnitType.Star);
            grid.ColumnDefinitions.Add(new ColumnDefinition());

            col = new ColumnDefinition();
            col.Width = GridLength.Auto;
            grid.ColumnDefinitions.Add(col);

            col = new ColumnDefinition();
            col.Width = new GridLength(3, GridUnitType.Star);
            grid.ColumnDefinitions.Add(col);

            // ClassHierarchyTreeView goes on left side.
            ClassHierarchyTreeView treevue =
                            new ClassHierarchyTreeView(typeof(DependencyObject));
            grid.Children.Add(treevue);
            Grid.SetColumn(treevue, 0);

            // GridSplitter goes in the center cell.
            GridSplitter split = new GridSplitter();
            split.HorizontalAlignment = HorizontalAlignment.Center;
            split.VerticalAlignment = VerticalAlignment.Stretch;
            split.Width = 6;
            grid.Children.Add(split);
            Grid.SetColumn(split, 1);

            // DependencyPropertyListView goes on right side.
            DependencyPropertyListView lstvue = new DependencyPropertyListView();
            grid.Children.Add(lstvue);
            Grid.SetColumn(lstvue, 2);

            // Set a binding between TreeView and ListView.
            lstvue.SetBinding(DependencyPropertyListView.TypeProperty,
                              "SelectedItem.Type");
            lstvue.DataContext = treevue;
        }
        public ExploreDependencyProperties()
        {
            Title = "Explore Dependency Properties";

            Grid grid = new Grid();
            Content = grid;

            ColumnDefinition col = new ColumnDefinition();
            col.Width = new GridLength(1, GridUnitType.Star);
            grid.ColumnDefinitions.Add(col);

            col = new ColumnDefinition();
            col.Width = GridLength.Auto;
            grid.ColumnDefinitions.Add(col);

            col = new ColumnDefinition();
            col.Width = new GridLength(3, GridUnitType.Star);
            grid.ColumnDefinitions.Add(col);

            ClassHierarchyTreeView treevue = new ClassHierarchyTreeView(typeof(DependencyObject));
            grid.Children.Add(treevue);
            Grid.SetColumn(treevue, 0);

            GridSplitter split = new GridSplitter();
            split.HorizontalAlignment = HorizontalAlignment.Center;
            split.VerticalAlignment = VerticalAlignment.Stretch;
            split.Width = 6;
            grid.Children.Add(split);
            Grid.SetColumn(split, 1);

            DependencyPropertyListView lstvue = new DependencyPropertyListView();
            grid.Children.Add(lstvue);
            Grid.SetColumn(lstvue, 2);

            lstvue.SetBinding(DependencyPropertyListView.TypeProperty, "SelectedItem.Type");
            lstvue.DataContext = treevue;
        }