[forms-devel] CalendarView in Xamarin.Forms
Miguel de Icaza
miguel at microsoft.com
Mon Sep 5 15:46:56 UTC 2016
My take is that high-level controls like the CalendarView belong to an add-on, and not to the core platform.
The reason is that these controls can have so many configuration options and features, that whatever we end up adding to the core will be deemed insufficient over time. The API will be insufficient, will have design limitations, and people do take specific dependencies on the UX. Putting in on the core means that the code will be subject to the API stability rules of the rest of the runtime core and some UX will have to be frozen in time as people take dependencies on it.
This is a perfect example of something that is best done outside the core as a separate control. Very much like chart controls, data-entry controls and so on.
From: forms-devel <forms-devel-bounces at lists.dot.net> on behalf of Sidharth Gupta <sidharth92 at gmail.com>
Date: Monday, September 5, 2016 at 9:38 AM
To: "forms-devel at lists.dot.net" <forms-devel at lists.dot.net>
Subject: [forms-devel] CalendarView in Xamarin.Forms
I have noticed that there is no simple way for application developers to provide calendars for users on Xamarin.Forms - there is no CalendarView.
I am thinking about a control where users can interact with a calendar by selecting a date or by browsing by month.
This picture from the Windows APIs shows what I have in mind: https://i-msdn.sec.s-msft.com/dynimg/IC790864.png<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fi-msdn.sec.s-msft.com%2fdynimg%2fIC790864.png&data=02%7c01%7cmiguel%40microsoft.com%7c65688618a6d54baadbc808d3d591ffc9%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636086795450738903&sdata=Za2ST9nsjAnw91YidnXOZRBAtESL9f9eAj6sCL%2bwiJU%3d> . Perhaps something like the month view.
What does everyone think about providing such a control to application developers in Xamarin.Forms?
The following native controls could be used:
Windows - https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/calendar-view<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fmsdn.microsoft.com%2fen-us%2fwindows%2fuwp%2fcontrols-and-patterns%2fcalendar-view&data=02%7c01%7cmiguel%40microsoft.com%7c65688618a6d54baadbc808d3d591ffc9%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636086795450738903&sdata=piSMpAz7bGtVhOLTu%2fMFfD9JCb%2bQ9VVEfFqB6XgwGB0%3d>
Android - https://developer.xamarin.com/api/type/Android.Widget.CalendarView/<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fdeveloper.xamarin.com%2fapi%2ftype%2fAndroid.Widget.CalendarView%2f&data=02%7c01%7cmiguel%40microsoft.com%7c65688618a6d54baadbc808d3d591ffc9%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636086795450738903&sdata=wNB7HiuixfAQcxJ95MMEF2f1bBoUvTd6VDRKxYOx8cY%3d>
iOS - As far as I know, iOS does not provide a native counterpart. We would have to create something... Can we provide a Xamarin.Forms control if there is no native counterpart?
It would allow only one date to be selected at a time. Initially, we could have the following properties:
- Date: The current selected date
- FirstDayOfWeek: The first day of the week
- MaxDate: The last date to display
- MinDate: The first date to display
And an event for whenever the user selects a date - EventArgs would be the selected date.
What does everyone think? I look forward to getting your thoughts regarding CalendarView.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the forms-devel