Пример #1
0
 private void DataForm_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "DataObject")
     {
         formModel = dataForm.DataObject as DataFormModel;
     }
 }
Пример #2
0
 protected override void OnAttachedTo(ContentPage bindable)
 {
     base.OnAttachedTo(bindable);
     dataForm = bindable.FindByName <SfDataForm>("dataForm");
     dataForm.SourceProvider = new SourceProviderExt();
     dataForm.RegisterEditor("Fruits", "DropDown");
     dataForm.PropertyChanged += DataForm_PropertyChanged;
     formModel       = dataForm.DataObject as DataFormModel;
     save            = bindable.FindByName <Button>("save");
     save.Clicked   += OnSaved;
     cancel          = bindable.FindByName <Button>("cancel");
     cancel.Clicked += OnCancel;
 }
Пример #3
0
 //On save
 private void OnSaved(object sender, EventArgs e)
 {
     dataForm.Validate();
     dataForm.Commit();
     formModel = dataForm.DataObject as DataFormModel;
 }
Пример #4
0
 public DataFormViewModel()
 {
     contactsInfo = new DataFormModel();
 }
Пример #5
0
 public DataFormViewModel()
 {
     formModel = new DataFormModel();
 }
Пример #6
0
 public DataFormViewModel()
 {
     this.dataObject = new DataFormModel();
 }