Пример #1
0
 public InternalPickerViewModel(PickerViewCell cell, Dictionary<int,PickerViewCellComponent> dataDict)
 {
     mDataDict = dataDict;
     mTableViewCell = cell;
 }
Пример #2
0
        public DateTableViewSource()
        {
            mCells = new List<BasePickerCell>();

            var aCell = new DatePickerCell(UIDatePickerMode.Date,DateTime.Now)
            {
                Key = "1234",
            };
            aCell.TextLabel.Text = "Date";
            aCell.RightLabelTextAlignment = UITextAlignment.Right;
            aCell.OnItemChanged += (object sender, PickerCellArgs e) => {

                var result = e.Items;
            };

            mCells.Add(aCell);

            var someDict = new Dictionary<int,PickerViewCellComponent>();
            someDict[0] = new PickerViewCellComponent()
            {
                Width = 160,
                Items = new List<PickerViewCellItem>()
                {
                    new PickerViewCellItem()
                    {
                        SelectedValue = 1,
                        DisplayValue = "Bob",
                    },
                    new PickerViewCellItem()
                    {
                        SelectedValue = 2,
                        DisplayValue = "John",
                    },
                }
            };

            someDict[1] = new PickerViewCellComponent()
            {
                Width = 160,
                Items = new List<PickerViewCellItem>()
                {
                    new PickerViewCellItem()
                    {
                        SelectedValue = 1,
                        DisplayValue = "Dylan",
                    },
                    new PickerViewCellItem()
                    {
                        SelectedValue = 2,
                        DisplayValue = "Lennon",
                    },
                }
            };

            // 			You can also use a string list for a single component
            //			var aList = new List<String> (){ "Ringo", "John", "Paul", "George" };
            //			var pickerCell = new PickerViewCell(aList);

            var pickerCell = new PickerViewCell(someDict);
            pickerCell.TextLabel.Text = "Artist";
            pickerCell.RightLabelTextAlignment = UITextAlignment.Right;
            pickerCell.SelectedObject = new object[]{1,1};

            pickerCell.OnItemChanged += (object sender, PickerCellArgs e) => {

                var result = e.Items;
            };

            mCells.Add(pickerCell);
        }
Пример #3
0
 public InternalPickerViewModel(PickerViewCell cell, Dictionary <int, PickerViewCellComponent> dataDict)
 {
     mDataDict      = dataDict;
     mTableViewCell = cell;
 }