예제 #1
0
        private void SetupPicker()
        {
            // Setup the picker and model
             PickerModel model = new PickerModel(this.colors);
             model.PickerChanged += (sender, e) => {
            this.selectedColor = e.SelectedValue;
             };

             UIPickerView picker = new UIPickerView();
             picker.ShowSelectionIndicator = true;
             picker.Model = model;
             http://www.windowsphone.com/tr-tr/store/app/anl%C4%B1k-hava-durumu/b26e9109-01c5-4e2d-9914-7ee19d2a0aa0?signin=truehttp://www.windowsphone.com/tr-tr/store/app/anl%C4%B1k-hava-durumu/b26e9109-01c5-4e2d-9914-7ee19d2a0aa0?signin=true
             // Setup the toolbar
             UIToolbar toolbar = new UIToolbar();
             toolbar.BarStyle = UIBarStyle.Black;
             toolbar.Translucent = true;
             toolbar.SizeToFit();

             // Create a 'done' button for the toolbar and add it to the toolbar
             UIBarButtonItem doneButton = new UIBarButtonItem("Tamam", UIBarButtonItemStyle.Done,
            (s, e) => {
               this.modulSec.Text = selectedColor;
               this.modulSec.ResignFirstResponder();
            });
             toolbar.SetItems(new UIBarButtonItem[]{doneButton}, true);

             // Tell the textbox to use the picker for input
             this.modulSec.InputView = picker;

             // Display the toolbar over the pickers
             this.modulSec.InputAccessoryView = toolbar;
        }