public DataEntryPage(DataEntryViewModel viewModel)
        {
            InitializeComponent();

            BindingContext = this.viewModel = viewModel;
            Entry          = viewModel.Entry;
            Form           = viewModel.Form;

            // type bindings
            if (Form.XFormType == "Numeric")
            {
                val1.Keyboard = Keyboard.Numeric;
            }
            else
            {
                val1.Keyboard = Keyboard.Text;
            }

            if (Form.YFormType == "Numeric")
            {
                val2.Keyboard = Keyboard.Numeric;
            }
            else
            {
                val2.Keyboard = Keyboard.Text;
            }
        }
 public DataEntryViewModel(Form form = null)
 {
     Title = form?.ChartName;
     Form  = form;
     Entry = new Entry
     {
         FormID = Form.Id
     };
 }
 public DataEntryPage()
 {
     InitializeComponent();
     Form  = new Form();
     Entry = new Entry
     {
         FormID = Form.Id
     };
     viewModel      = new DataEntryViewModel(Form);
     BindingContext = viewModel;
 }