Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Calendar is a widget that helps applications to flexibly display a calender with day of the week, date, year, and month.
public class Calendar : Layout, IAccessibleObject
- Inheritance
-
- Implements
-
Constructors
View Source
Calendar(EvasObject)
Creates and initializes a new instance of the Calendar class.
Declaration
public Calendar(EvasObject parent)
Parameters
| Type |
Name |
Description |
| EvasObject |
parent |
The EvasObject to which the new calendar will be attached as a child.
|
Properties
View Source
Gets or sets the date format of the string that will be used to display month and year.
Declaration
public Calendar.DateFormatDelegate DateFormat { get; set; }
Property Value
View Source
DisplayedTime
Sets or gets the first day of the week, which is used on the calendar.
Declaration
public DateTime DisplayedTime { get; }
Property Value
| Type |
Description |
| System.DateTime |
|
View Source
FirstDayOfWeek
Sets or gets the first day of the week, which is used on the calendar.
Declaration
public DayOfWeek FirstDayOfWeek { get; set; }
Property Value
| Type |
Description |
| System.DayOfWeek |
|
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
public double Interval { get; set; }
Property Value
View Source
MaximumYear
Sets or gets the maximum for the year.
Declaration
public int MaximumYear { get; set; }
Property Value
View Source
MinimumYear
Sets or gets the minimum for year.
Declaration
public int MinimumYear { get; set; }
Property Value
View Source
Selectable
Gets or sets the fields of a datetime that will be taken into account, when SelectedDate set is invoked.
Declaration
public CalendarSelectable Selectable { get; set; }
Property Value
View Source
SelectedDate
Sets or gets the selected date.
Declaration
public DateTime SelectedDate { get; set; }
Property Value
| Type |
Description |
| System.DateTime |
|
View Source
SelectMode
Gets or sets the select day mode used.
Declaration
public CalendarSelectMode SelectMode { get; set; }
Property Value
View Source
WeekDayNames
Sets or gets the weekdays name to be displayed by the calendar.
Declaration
public IReadOnlyList<string> WeekDayNames { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<T><string> |
|
Methods
View Source
AddMark(string, DateTime, CalendarMarkRepeatType)
Adds a new mark to the calendar.
Declaration
public CalendarMark AddMark(string type, DateTime date, CalendarMarkRepeatType repeat)
Parameters
| Type |
Name |
Description |
| 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
View Source
ClearMarks()
Removes all the calendar's marks.
Declaration
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
| Type |
Name |
Description |
| EvasObject |
parent |
Parent EvasObject.
|
Returns
| Type |
Description |
| System.IntPtr |
Handle IntPtr.
|
Overrides
View Source
DeleteMark(CalendarMark)
Deletes a mark from the calendar.
Declaration
public void DeleteMark(CalendarMark mark)
Parameters
| Type |
Name |
Description |
| CalendarMark |
mark |
Item for a calendar mark.
|
Declaration
Events
View Source
DateChanged
DateChanged will be triggered when the date in the calendar is changed.
Declaration
public event EventHandler<DateChangedEventArgs> DateChanged
Event Type
View Source
DisplayedMonthChanged
DisplayedMonthChanged will be triggered when the current month displayed in the calendar is changed.
Declaration
public event EventHandler<DisplayedMonthChangedEventArgs> DisplayedMonthChanged
Event Type
Implements
Extension Methods