protected override void OnAppearing() { base.OnAppearing(); try { var viewModel = (AddChildViewModel)BindingContext; if (viewModel != null && viewModel.OfflineStudentID > 0) { lblTitle.Text = "EDIT CHILD INFORMATION"; } else { lblTitle.Text = "ADD CHILD INFORMATION"; } //Workaround: UI Image buttons rearrangement on keyboard show/hide if (Device.RuntimePlatform == Device.Android) { Device.BeginInvokeOnMainThread(async() => { ChildFirstName.Focus(); //ChildMiddleName.Focus(); await Task.Delay(20); ChildFirstName.IsEnabled = false; ChildFirstName.IsEnabled = true; ChildMiddleName.IsEnabled = false; ChildMiddleName.IsEnabled = true; }); } } catch (Exception ex) { } }
private void ChildFirstName_Focused(object sender, FocusEventArgs e) { if (MyResumeSyncViewModel.ShowTestSelection) { MyResumeSyncViewModel.ShowTestSelection = false; ChildFirstName.Unfocus(); } }