public override void OnPause() { base.OnPause(); if (dialog != null && dialog.IsShowing) { dialog.Dismiss(); } }
void DeviceInfoPropertyChanged(object sender, DisplayInfoChangedEventArgs e) { DatePickerDialog currentDialog = _dialog; if (currentDialog != null && currentDialog.IsShowing) { currentDialog.Dismiss(); currentDialog.CancelEvent -= OnCancelButtonClicked; ShowPickerDialog(currentDialog.DatePicker.Year, currentDialog.DatePicker.Month, currentDialog.DatePicker.DayOfMonth); } }
void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "CurrentOrientation") { DatePickerDialog currentDialog = _dialog; if (currentDialog != null && currentDialog.IsShowing) { currentDialog.Dismiss(); CreateDatePickerDialog(currentDialog.DatePicker.Year, currentDialog.DatePicker.Month, currentDialog.DatePicker.DayOfMonth); _dialog.Show(); } } }
private void SetResultDate(DateTime?date) { if (_datePickerDialog.IsShowing) { _datePickerDialog.Dismiss(); } if (_tcsDate == null) { return; } _tcsDate.TrySetResult(date); _tcsDate = null; }
void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "CurrentOrientation") { DatePickerDialog currentDialog = _dialog; if (currentDialog != null && currentDialog.IsShowing) { currentDialog.Dismiss(); if (Forms.IsLollipopOrNewer) { currentDialog.CancelEvent -= OnCancelButtonClicked; } ShowPickerDialog(currentDialog.DatePicker.Year, currentDialog.DatePicker.Month, currentDialog.DatePicker.DayOfMonth); } } }
internal protected override void Close() { _dialog?.Dismiss(); }