Beispiel #1
0
        public PerformanceTest2Page()
        {
            InitializeComponent();
            StartButton.Clicked += OnButtonScrollClicked;

            var items = new ListItemTitleSwitch[TestItems];

            for (int i = 0; i < TestItems; i++)
            {
                items[i] = new ListItemTitleSwitch("item: " + i.ToString());
                LabelsListView.Add(items[i]);
            }
        }
        public PerformanceTest2Page()
        {
            InitializeComponent();

            //Application Linear Layout
            LinearLayout layout = new LinearLayout();

            layout.LinearOrientation = LinearLayout.Orientation.Vertical;
            layout.LinearAlignment   = LinearLayout.Alignment.Center;
            layout.Padding           = new Extents(5, 5, 5, 5);
            layout.CellPadding       = new Size2D(5, 5);

            this.Layout          = layout;
            StartButton.Clicked += OnButtonScrollClicked;

            //Create List for Labels
            LabelsListView = new ScrollableBase();
            LabelsListView.BackgroundColor = Color.White;
            LabelsListView.Size2D          = new Size2D(700, 1200);

            //Set linead layout for scrollable widget
            LinearLayout scrollLayout = new LinearLayout();

            scrollLayout.LinearOrientation = LinearLayout.Orientation.Vertical;
            scrollLayout.LinearAlignment   = LinearLayout.Alignment.Center;
            scrollLayout.CellPadding       = new Size2D(5, 5);
            LabelsListView.Layout          = scrollLayout;
            LabelsListView.ScrollDuration  = ScrollTime;
            this.Add(LabelsListView);

            var items = new ListItemTitleSwitch[TestItems];

            for (int i = 0; i < TestItems; i++)
            {
                items[i] = new ListItemTitleSwitch("item: " + i.ToString());
                LabelsListView.Add(items[i]);
            }
        }