Ejemplo n.º 1
0
        public GroupedItemsDemo()
        {
            this.InitializeComponent();
            this.Groups = new List<GroupOfItems>();
     
            for (int i = 0; i < 4; i++)
            {
                GroupOfItems goi = new GroupOfItems();
                goi.GroupTitle = "Group " + i.ToString();
                for (int j = 0; j < 5; j++)
                {
                    Item item = new Item("Item " + j.ToString(),
                        "Desc " + j.ToString());
                    goi.GroupItems.Add(item);
                }

                this.Groups.Add(goi);
            }

            this.collectionViewSourceName.Source = this.Groups;
        }
        public GroupedItemsDemo()
        {
            this.InitializeComponent();
            this.Groups = new List <GroupOfItems>();

            for (int i = 0; i < 4; i++)
            {
                GroupOfItems goi = new GroupOfItems();
                goi.GroupTitle = "Group " + i.ToString();
                for (int j = 0; j < 5; j++)
                {
                    Item item = new Item("Item " + j.ToString(),
                                         "Desc " + j.ToString());
                    goi.GroupItems.Add(item);
                }

                this.Groups.Add(goi);
            }

            this.collectionViewSourceName.Source = this.Groups;
        }