-
-
Notifications
You must be signed in to change notification settings - Fork 39
DayView Properties
Marvin E edited this page Apr 18, 2024
·
9 revisions
The DayView contains all the properties of a Label.
| Property | Type | Description |
|---|---|---|
DateTime |
The date the view represents. | |
ICommand |
The command to execute when pressed. | |
object |
The command parameter of the command used when pressed. | |
bool |
The value used to determine if the CalendarDayView can be in the DayState.CurrentMonth or DayState.OtherMonth DayState. |
|
bool |
The value used to determine if the CalendarDayView can be in the DayState.Today DayState. |
|
bool |
The value used to determine if the CalendarDayView can be in the DayState.Selected DayState. |
|
bool |
The value used to determine if the CalendarDayView can be in the DayState.Invalid DayState. |
|
DayState |
The exclusive state the CalendarDayView is in. | |
bool |
When set to true (which is its default value), the DayView will update its active style based on any properties that may change the DayState. For example DateTime or IsCurrentMonth
|
|
bool |
Indicates if the CalendarDayView's DayState is DayState.CurrentMonth. |
|
bool |
Indicates if the CalendarDayView's DayState is DayState.OtherMonth. |
|
bool |
Indicates if the CalendarDayView's DayState is DayState.Today. |
|
bool |
Indicates if the CalendarDayView's DayState is DayState.Selected. |
|
bool |
Indicates if the CalendarDayView's DayState is DayState.Invalid. |
|
Style |
The style to apply to the control when it is in the DayState.CurrentMonth DayState. The default value for this can be accessed in the XCalendar.[Forms/Maui].Styles.DefaultStyles class which can also be referenced in XAML using the {x:Static} markup extension. |
|
Style |
The style to apply to the control when it is in the DayState.OtherMonth DayState. The default value for this can be accessed in the XCalendar.[Forms/Maui].Styles.DefaultStyles class which can also be referenced in XAML using the {x:Static} markup extension. |
|
Style |
The style to apply to the control when it is in the DayState.Today DayState. The default value for this can be accessed in the XCalendar.[Forms/Maui].Styles.DefaultStyles class which can also be referenced in XAML using the {x:Static} markup extension. |
|
Style |
The style to apply to the control when it is in the DayState.Selected DayState. The default value for this can be accessed in the XCalendar.[Forms/Maui].Styles.DefaultStyles class which can also be referenced in XAML using the {x:Static} markup extension. |
|
Style |
The style to apply to the control when it is in the DayState.Invalid DayState. The default value for this can be accessed in the XCalendar.[Forms/Maui].Styles.DefaultStyles class which can also be referenced in XAML using the {x:Static} markup extension. |
|
IEnumerable<IEvent> |
The events to be shown. The default look is an indicator, the default indicator look only works with events that have a Color property such as the ColoredEvent classes in XCalendar.Forms.Models and XCalendar.Maui.Models. |
|
ControlTemplate |
The template used to display the events of the Events property. |
|
DataTemplate |
The template used to display an event. | |
double |
The WidthRequest of a displayed event. |
|
double |
The HeightRequest of a displayed event. |
|
double |
The spacing of displayed events. | |
StackOrientation |
The orientation of the events. This can either be vertical or horizontal. | |
bool |
When this is true, the view for events is only shown if there is at least one event. If there are no events, the view is collapsed.When this is false, the view for events is always shown. This is useful if you're using templates and want to use custom logic that depends on the events view always being shown. |
There are 5 DayStates a CalendarDayView can be in:
CurrentMonthOtherMonthTodaySelectedInvalid
Using the above screenshot as an example:
- The dates from 30th May - 2nd June are
Invalid, - 6th June is
Today - 15th June, 17th June, 18th June are
Selected - 1st July - 10th July are
OtherMonth - The rest are
CurrentMonth.