Beispiel #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing && !this.IsDisposed)
            {
                this.IsDisposed = true;

                if (this.Model != null)
                {
                    this.Model.Dispose();
                    this.Model = null;
                }
            }
        }
Beispiel #2
0
 private void InitPicker()
 {
     if (this.Model == null)
     {
         this.Model = new DataPickerModel(
             this.Element.StringValues,
             this.Element.TextColor.ToUIColor(),
             this.Element.DividerColor.ToUIColor(),
             this.Element.FontSize
             );
         this.Model.PickerChanged += Model_PickerChanged;
         this.Control.Model        = this.Model;
         this.UpdateSelectedItem(this.Element.SelectedIndex);
     }
 }
        public void UpdatePicker()
        {
            if (this.Element.ItemsSource != null)
            {
                var model = new DataPickerModel(this.Element.StringValues);
                model.PickerChanged += Model_PickerChanged;
                this.Control.Model   = model;

                if (this.Element.SelectedIndex >= 0)
                {
                    model.Selected(this.Control, this.Element.SelectedIndex, 0);
                }
                else
                {
                    model.Selected(this.Control, 0, 0);
                }
            }
        }