Пример #1
0
        //[TestMethod] Disabled with issue number #1775 (WinUI issue)
        public void TreeViewInheritanceTest()
        {
            StackPanel          stackPanel            = new StackPanel();
            SpecialTreeView     inheritedTreeView     = new SpecialTreeView();
            SpecialTreeViewList inheritedTreeViewList = new SpecialTreeViewList();
            SpecialTreeViewItem inheritedTreeViewItem = new SpecialTreeViewItem();
            SpecialTreeViewNode inheritedTreeViewNode = new SpecialTreeViewNode();
            IList <string>      data = Enumerable.Range(0, 5).Select(x => "Item " + x).ToList();

            Verify.IsNotNull(stackPanel);
            stackPanel.Children.Add(inheritedTreeView);
            stackPanel.Children.Add(inheritedTreeViewList);
            inheritedTreeViewList.ItemsSource       = data;
            TestServices.WindowHelper.WindowContent = stackPanel;
            stackPanel.UpdateLayout();
        }
Пример #2
0
        //[TestMethod] Disabled with issue number #1775
        public void TreeViewInheritanceTest()
        {
            RunOnUIThread.Execute(() =>
            {
                StackPanel stackPanel                     = new StackPanel();
                SpecialTreeView inheritedTreeView         = new SpecialTreeView();
                SpecialTreeViewList inheritedTreeViewList = new SpecialTreeViewList();
                SpecialTreeViewItem inheritedTreeViewItem = new SpecialTreeViewItem();
                SpecialTreeViewNode inheritedTreeViewNode = new SpecialTreeViewNode();
                IList <string> data = Enumerable.Range(0, 5).Select(x => "Item " + x).ToList();

                Verify.IsNotNull(stackPanel);
                stackPanel.Children.Add(inheritedTreeView);
                stackPanel.Children.Add(inheritedTreeViewList);
                inheritedTreeViewList.ItemsSource = data;
                Content = stackPanel;
                Content.UpdateLayout();
            });
        }