Ejemplo n.º 1
0
        void InitCollectionView()
        {
            tasks                  = new List <KinderTask> ();
            dataSource             = new TaskCollectionViewSource(tasks);
            dataSource.Selected   += OnItemSelected;
            dataSource.Deselected += OnItemDeselected;
            CollectionView.Source  = dataSource;
            CollectionView.RegisterClassForCell(typeof(TaskCell), TaskCell.CellId);
            CollectionView.AllowsMultipleSelection = true;
            CollectionView.BackgroundColor         = UIColor.Clear;

            var layout = (UICollectionViewFlowLayout)CollectionView.CollectionViewLayout;

            layout.MinimumLineSpacing      = 0;
            layout.MinimumInteritemSpacing = 0;
            layout.SectionInset            = UIEdgeInsets.Zero;
        }
		void InitCollectionView()
		{
			tasks = new List<KinderTask> ();
			dataSource = new TaskCollectionViewSource (tasks);
			dataSource.Selected += OnItemSelected;
			dataSource.Deselected += OnItemDeselected;
			CollectionView.Source = dataSource;
			CollectionView.RegisterClassForCell (typeof(TaskCell), TaskCell.CellId);
			CollectionView.AllowsMultipleSelection = true;
			CollectionView.BackgroundColor = UIColor.Clear;

			var layout = (UICollectionViewFlowLayout)CollectionView.CollectionViewLayout;
			layout.MinimumLineSpacing = 0;
			layout.MinimumInteritemSpacing = 0;
			layout.SectionInset = UIEdgeInsets.Zero;
		}