示例#1
0
        public Measure()
        {
            var panel = new StackPanel();

            _root = new TestRoot
            {
                Child    = panel,
                Renderer = new NullRenderer()
            };

            _controls.Add(panel);
            _controls = ControlHierarchyCreator.CreateChildren(_controls, panel, 3, 5, 5);

            _root.LayoutManager.ExecuteInitialLayoutPass();
        }
示例#2
0
        public VisualTreeTraversal()
        {
            var panel = new StackPanel();

            _root = new TestRoot {
                Child = panel, Renderer = new NullRenderer()
            };
            _controls.Add(panel);
            _controls = ControlHierarchyCreator.CreateChildren(_controls, panel, 3, 5, 4);

            var random = new Random(1);

            _shuffledControls = _controls.OrderBy(r => random.Next()).ToList();

            _root.LayoutManager.ExecuteInitialLayoutPass(_root);
        }