private void DatePicker_Tapped(object sender, EventArgs e) { if ((this.BindingContext as OrdonnanceCreateEditViewModel).CanEdit) { MyDatePicker.Focus(); } }
private void OnMyButtonClicked(object sender, EventArgs e) { Device.BeginInvokeOnMainThread(() => { if (MyDatePicker.IsFocused) { MyDatePicker.Unfocus(); } MyDatePicker.Focus(); }); }