Esempio n. 1
0
        public override void Run(Box parent)
        {
            var collectionView = new Ext.CollectionView(parent)
            {
                WeightX    = 1,
                WeightY    = 1,
                AlignmentY = -1,
                AlignmentX = -1,
            };

            collectionView.Show();

            var items = new List <string>();

            for (int i = 0; i < 100; i++)
            {
                items.Add($"Items {i}");
            }
            var adaptor = new MyAdaptor(items);

            collectionView.Adaptor       = adaptor;
            collectionView.LayoutManager = new Ext.GridLayoutManager(false, 3, Ext.ItemSizingStrategy.MeasureAllItems, 10, 10);

            parent.PackEnd(collectionView);
        }
        EvasObject CreateContent(EvasObject parent)
        {
            var collectionView = new Ext.CollectionView(parent)
            {
                WeightX    = 1,
                WeightY    = 1,
                AlignmentY = -1,
                AlignmentX = -1,
            };

            collectionView.Show();

            var items = new List <string>();

            for (int i = 0; i < 100; i++)
            {
                items.Add($"Items {i}");
            }
            var adaptor = new MyAdaptor(items);

            collectionView.Adaptor       = adaptor;
            collectionView.LayoutManager = new Ext.LinearLayoutManager(false, Ext.ItemSizingStrategy.MeasureAllItems, 10);

            return(collectionView);
        }