Beispiel #1
0
 public UIComboBox(CGRect rect) : base(rect)
 {
     this.BorderStyle = UITextBorderStyle.RoundedRect;
     pickerView       = new PickerView();
     this.TouchDown  += delegate {
         ShowPicker();
     };
     this.ShouldChangeCharacters += delegate {
         return(false);
     };
     pickerView.IndexChanged += delegate {
         var oldValue = this.Text;
         this.Text = pickerView.StringValue;
         if (ValueChanged != null && oldValue != Text)
         {
             ValueChanged(this, null);
         }
     };
     closeBtn = new UIButton(new CGRect(0, 0, 31, 32));
     closeBtn.SetImage(Tools.iOSTool.EmbeddedImage("closebox.png"), UIControlState.Normal);
     closeBtn.TouchDown += delegate {
         HidePicker();
     };
     pickerView.AddSubview(closeBtn);
 }
Beispiel #2
0
 public PickerData(PickerView picker)
 {
     Picker = picker;
 }