Class Calendar

Definition

Namespace:
ElmSharp
Assembly:
ElmSharp.dll
API Level:
preview

The Calendar is a widget that helps applications to flexibly display a calender with day of the week, date, year, and month.

C#
Copy
public class Calendar : Layout, IAccessibleObject
Inheritance
Implements

Constructors

View Source

Calendar(EvasObject)

Creates and initializes a new instance of the Calendar class.

Declaration
C#
Copy
public Calendar(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

The EvasObject to which the new calendar will be attached as a child.

API Level: preview

Properties

View Source

DateFormat

Gets or sets the date format of the string that will be used to display month and year.

Declaration
C#
Copy
public Calendar.DateFormatDelegate DateFormat { get; set; }
Property Value
Type Description
Calendar.DateFormatDelegate
API Level: preview
View Source

DisplayedTime

Sets or gets the first day of the week, which is used on the calendar.

Declaration
C#
Copy
public DateTime DisplayedTime { get; }
Property Value
Type Description
System.DateTime
API Level: preview
View Source

FirstDayOfWeek

Sets or gets the first day of the week, which is used on the calendar.

Declaration
C#
Copy
public DayOfWeek FirstDayOfWeek { get; set; }
Property Value
Type Description
DayOfWeek
API Level: preview
View Source

Interval

Sets or gets the interval on time updates for a user mouse button hold, on the calendar widgets' month/year selection.

Declaration
C#
Copy
public double Interval { get; set; }
Property Value
Type Description
System.Double
API Level: preview
View Source

MaximumYear

Sets or gets the maximum for the year.

Declaration
C#
Copy
public int MaximumYear { get; set; }
Property Value
Type Description
System.Int32
API Level: preview
View Source

MinimumYear

Sets or gets the minimum for year.

Declaration
C#
Copy
public int MinimumYear { get; set; }
Property Value
Type Description
System.Int32
API Level: preview
View Source

Selectable

Gets or sets the fields of a datetime that will be taken into account, when SelectedDate set is invoked.

Declaration
C#
Copy
public CalendarSelectable Selectable { get; set; }
Property Value
Type Description
CalendarSelectable
API Level: preview
View Source

SelectedDate

Sets or gets the selected date.

Declaration
C#
Copy
public DateTime SelectedDate { get; set; }
Property Value
Type Description
System.DateTime
Remarks

The selected date changes when the user goes to the next/previous month or selects a day pressing over it on the calendar.

API Level: preview
View Source

SelectMode

Gets or sets the select day mode used.

Declaration
C#
Copy
public CalendarSelectMode SelectMode { get; set; }
Property Value
Type Description
CalendarSelectMode
API Level: preview
View Source

WeekDayNames

Sets or gets the weekdays name to be displayed by the calendar.

Declaration
C#
Copy
public IReadOnlyList<string> WeekDayNames { get; set; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<System.String>
Remarks

The usage should be like this: List<string> weekDayNames = new List<string>() { "S", "M", "T", "W", "T", "F", "S" }; Calendar.WeekDayNames = weekDayNames;

API Level: preview

Methods

View Source

AddMark(String, DateTime, CalendarMarkRepeatType)

Adds a new mark to the calendar.

Declaration
C#
Copy
public CalendarMark AddMark(string type, DateTime date, CalendarMarkRepeatType repeat)
Parameters
Type Name Description
System.String type

A string used to define the type of mark. It will be emitted to the theme that should display a related modification on these day's representation.

System.DateTime date

A time struct to represent the date of inclusion of the mark. For marks that repeat, it will just be displayed after the inclusion date in the calendar.

CalendarMarkRepeatType repeat

Repeat the event following this periodicity. Can be a unique mark (that doesn't repeat), daily, weekly, monthly, or annually.

Returns
Type Description
CalendarMark

Item for a calendar mark.

API Level: preview
View Source

ClearMarks()

Removes all the calendar's marks.

Declaration
C#
Copy
public void ClearMarks()
API Level: preview
View Source

CreateHandle(EvasObject)

Creates a widget handle.

Declaration
C#
Copy
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

Parent EvasObject.

Returns
Type Description
System.IntPtr

Handle IntPtr.

Overrides
API Level: preview
View Source

DeleteMark(CalendarMark)

Deletes a mark from the calendar.

Declaration
C#
Copy
public void DeleteMark(CalendarMark mark)
Parameters
Type Name Description
CalendarMark mark

Item for a calendar mark.

API Level: preview
View Source

DrawMarks()

Draws the calendar marks.

Declaration
C#
Copy
public void DrawMarks()
API Level: preview

Events

View Source

DateChanged

DateChanged will be triggered when the date in the calendar is changed.

Declaration
C#
Copy
public event EventHandler<DateChangedEventArgs> DateChanged
Event Type
Type Description
System.EventHandler<DateChangedEventArgs>
API Level: preview
View Source

DisplayedMonthChanged

DisplayedMonthChanged will be triggered when the current month displayed in the calendar is changed.

Declaration
C#
Copy
public event EventHandler<DisplayedMonthChangedEventArgs> DisplayedMonthChanged
Event Type
Type Description
System.EventHandler<DisplayedMonthChangedEventArgs>
API Level: preview

Implements

Extension Methods