예제 #1
0
        private void AddInheritedTreeViewNode_Click(object sender, RoutedEventArgs e)
        {
            var node = new TreeViewNode2()
            {
                Content = "Inherited from TreeViewNode"
            };

            _visualRoot.Children.Add(node);
        }
예제 #2
0
        public void TreeViewNodeStringableTest()
        {
            var node = new TreeViewNode()
            {
                Content = "Node"
            };

            Verify.AreEqual(node.Content, node.ToString());

            // Test inherited type
            var node2 = new TreeViewNode2()
            {
                Content = "Inherited from TreeViewNode"
            };

            Verify.AreEqual(node2.Content, node2.ToString());
        }