Example #1
0
        public void TestItemVirtualizedMeasure()
        {
            var measureSize = new Vector3(100, 200, 300);

            var stackPanel = new StackPanel { ItemVirtualizationEnabled = true, Orientation = Orientation.Vertical };
            stackPanel.Children.Add(new UniformGrid { Width = 10, Height = 40 });
            stackPanel.Children.Add(new UniformGrid { Width = 20, Height = 30 });
            stackPanel.Children.Add(new UniformGrid { Width = 30, Height = 20 });
            
            stackPanel.Measure(measureSize);

            Assert.AreEqual(new Vector3(30, 90, 0), stackPanel.DesiredSizeWithMargins);
        }