/// <summary>
/// Enumeration for event periodicity, used to define if a mark should be repeated beyond event's day. It's set when a mark is added.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public enum CalendarMarkRepeatType
{
/// <summary>
/// <summary>
/// Enumeration for the mode, which determine how user could select a day.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public enum CalendarSelectMode
{
/// <summary>
/// <summary>
/// Enumeration used to define which fields of a tm struct will be taken into account
/// </summary>
+ /// <since_tizen> preview </since_tizen>
[Flags]
public enum CalendarSelectable
{
/// <summary>
/// The CalendarMark is a Item for marking a Calendar's type,date and repeat type.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public class CalendarMark
{
internal IntPtr Handle;
/// <summary>
/// A string used to define the type of mark.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public string Type;
/// <summary>
/// A time struct to represent the date of inclusion of the mark.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public DateTime Date;
/// <summary>
/// Repeat the event following this periodicity.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public CalendarMarkRepeatType Repeat;
/// <summary>
/// <param name="type">Type of mark</param>
/// <param name="date">Date of inclusion of the mark</param>
/// <param name="repeat">Repeat type</param>
+ /// <since_tizen> preview </since_tizen>
public CalendarMark(string type, DateTime date, CalendarMarkRepeatType repeat)
{
Handle = IntPtr.Zero;
/// <summary>
/// The Calendar is a widget that helps applications to flexibly display a calender with day of the week, date, year and month.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public class Calendar : Layout
{
SmartEvent _changed;
/// <param name="parent">
/// The EvasObject to which the new Calendar will be attached as a child.
/// </param>
+ /// <since_tizen> preview </since_tizen>
public Calendar(EvasObject parent) : base(parent)
{
_changed = new SmartEvent(this, this.RealHandle, "changed");
/// <summary>
/// DateChanged will be triggered when the date in the calendar is changed.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public event EventHandler<DateChangedEventArgs> DateChanged;
/// <summary>
/// DisplayedMonthChanged will be triggered when the current month displayed in the calendar is changed.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public event EventHandler<DisplayedMonthChangedEventArgs> DisplayedMonthChanged;
/// <summary>
/// </summary>
/// <param name="time">DateTime</param>
/// <returns></returns>
+ /// <since_tizen> preview </since_tizen>
public delegate string DateFormatDelegate(DateTime time);
/// <summary>
/// Sets or gets the minimum for year.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public int MinimumYear
{
get
/// <summary>
/// Sets or gets the maximum for the year.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public int MaximumYear
{
get
/// <summary>
/// Sets or gets the first day of week, who are used on Calendar.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public DateTime DisplayedTime
{
get
/// <summary>
/// Sets or gets the first day of week, who are used on Calendar.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public DayOfWeek FirstDayOfWeek
{
get
/// <![CDATA[List<string> weekDayNames = new List<string>() { "S", "M", "T", "W", "T", "F", "S" };]]>
/// Calendar.WeekDayNames = weekDayNames;
/// </remarks>
+ /// <since_tizen> preview </since_tizen>
public IReadOnlyList<string> WeekDayNames
{
get
/// <remarks>
/// Selected date changes when the user goes to next/previous month or select a day pressing over it on calendar.
/// </remarks>
+ /// <since_tizen> preview </since_tizen>
public DateTime SelectedDate
{
get
/// Sets or gets the interval on time updates for an user mouse button
/// hold on calendar widgets' month/year selection.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public double Interval
{
get
/// <summary>
/// Gets or sets the select day mode used.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public CalendarSelectMode SelectMode
{
get
/// <summary>
/// Gets or sets fields of a datetime will be taken into account, when SelectedDate set is invoked.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public CalendarSelectable Selectable
{
get
/// <summary>
/// Gets or sets date format the string that will be used to display month and year.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public DateFormatDelegate DateFormat
{
get
/// <param name="date">A time struct to represent the date of inclusion of the mark. For marks that repeats it will just be displayed after the inclusion date in the calendar.</param>
/// <param name="repeat">Repeat the event following this periodicity. Can be a unique mark (that don't repeat), daily, weekly, monthly or annually.</param>
/// <returns>Item for a calendar mark.</returns>
+ /// <since_tizen> preview </since_tizen>
public CalendarMark AddMark(string type, DateTime date, CalendarMarkRepeatType repeat)
{
CalendarMark mark = new CalendarMark(type, date, repeat);
/// Delete mark from the calendar.
/// </summary>
/// <param name="mark">Item for a calendar mark</param>
+ /// <since_tizen> preview </since_tizen>
public void DeleteMark(CalendarMark mark)
{
Interop.Elementary.elm_calendar_mark_del(mark.Handle);
/// <summary>
/// Draw calendar marks.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public void DrawMarks()
{
Interop.Elementary.elm_calendar_marks_draw(RealHandle);
/// <summary>
/// Remove all calendar's marks.
/// </summary>
+ /// <since_tizen> preview </since_tizen>
public void ClearMarks()
{
Interop.Elementary.elm_calendar_marks_clear(RealHandle);
/// </summary>
/// <param name="parent">Parent EvasObject</param>
/// <returns>Handle IntPtr</returns>
+ /// <since_tizen> preview </since_tizen>
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);