public DateTime SelectDate(DateTime date, object widget) { CalendarDialog dialog = new CalendarDialog(date); dialog.TransientFor = (widget as Widget).Toplevel as Gtk.Window; dialog.Run(); date = dialog.Date; dialog.Destroy(); return(date); }
public Task <DateTime> SelectDate(DateTime date, object widget) { CalendarDialog dialog = new CalendarDialog(date); dialog.TransientFor = (widget as Widget).Toplevel as Gtk.Window; dialog.Run(); date = dialog.Date; dialog.Destroy(); var task = AsyncHelpers.Return(date); return(task); }