示例#1
0
        public ComplexListView()
        {
            Performance.SetProvider(_PerformanceProvider);
            _PerformanceProvider.Clear();

            var showPerf = new Button {
                Text = "Performance"
            };

            showPerf.Clicked += (sender, args) => {
                _PerformanceProvider.DumpStats();
                _PerformanceProvider.Clear();
            };

            Content = new StackLayout {
                Orientation = StackOrientation.Vertical,
                Children    =
                {
                    showPerf,
                    new ListView {
                        ItemTemplate = new DataTemplate(typeof(ComplexViewCell)),
                        ItemsSource  =
                            new[] {
                            "a","b",  "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a",
                            "b","c",  "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c"
                        }
                    }
                }
            };
        }
示例#2
0
        public void RunTest(PerformanceScenario scenario)
        {
            Scenario = scenario.Name;

            double time;

            BenchmarkResults.TryGetValue(scenario.Name, out time);
            ExpectedRenderTime = time;

            _Provider.Clear();
            View = scenario.View;
        }