SchedulerView
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Displays appointments in day, week, work-week, month, agenda or resource timeline layouts.
- C#
- VB.NET
public class SchedulerView : Control
Public Class SchedulerView
Inherits Control
Dates are application-local wall-clock values, without browser time-zone conversion. End dates are exclusive. Recurrences expand only within the visible range. Moving or resizing a recurrence detaches that occurrence; all other occurrences retain the rule. Pointer motion stays client-side. Creation, movement and resizing commit after server validation and their cancellable pre-events. Tag objects never leave the server.
Example:
var scheduler = new SchedulerView { Dock = DockStyle.Fill, View = SchedulerViewMode.Week };
scheduler.Appointments.Add(new SchedulerAppointment {
Text = "Planning", Start = DateTime.Today.AddHours(9), End = DateTime.Today.AddHours(10)
});
scheduler.AppointmentCreating += (s, e) => e.Appointment.Text = "New meeting";
Controls.Add(scheduler);
Constructors
SchedulerView()
Initializes an editable weekly scheduler with thirty-minute slots.
Properties
AgendaText
String: Gets or sets the localized override for the "Agenda" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
AllDayText
String: Gets or sets the localized override for the "All day" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
AllowCreate
Boolean: Allows pointer range selection to create appointments. (Default: True)
AllowMove
Boolean: Allows appointments to move between times and resources. (Default: True)
AllowResize
Boolean: Allows appointments to be resized from their trailing edge. (Default: True)
Appointments
AppointmentCollection: Owned appointments. Item edits refresh the client automatically.
CurrentTimeText
String: Gets or sets the localized override for the "Current time" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
Date
DateTime: Anchor date used to determine the visible calendar range.
DayText
String: Gets or sets the localized override for the "Day" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
EndHour
Int32: Last visible hour, exclusive, from 1 through 24. (Default: 18)
MonthText
String: Gets or sets the localized override for the "Month" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
NewAppointmentText
String: Gets or sets the initial title of a user-created appointment. (Default: null)
The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation. The title is assigned before AppointmentCreating is raised, so the handler can replace it. Changing this property does not rename existing appointments.
Example:
var control = new SchedulerView();
control.NewAppointmentText = "Meeting";
control.NewAppointmentText = null; // Restore the built-in localized text.
NextPeriodText
String: Gets or sets the localized override for the "Next period" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
NoAppointmentsText
String: Gets or sets the localized override for the "No appointments" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
PreviousPeriodText
String: Gets or sets the localized override for the "Previous period" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
RangeEnd
DateTime: Exclusive date after the last visible date.
RangeStart
DateTime: Inclusive first visible date.
Resources
ResourceCollection: Owned resources displayed as timeline rows.
ResourceText
String: Gets or sets the localized override for the "Resource" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
ShowCurrentTime
Boolean: Shows the current time marker using application-local time. (Default: True)
SlotDuration
Int32: Slot duration in minutes; a positive divisor of 60. (Default: 30)
StartHour
Int32: First visible hour, inclusive, from 0 through 23. (Default: 8)
TimelineText
String: Gets or sets the localized override for the "Timeline" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
TodayText
String: Gets or sets the localized override for the "Today" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
UnassignedText
String: Gets or sets the localized override for the "Unassigned" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
View
SchedulerViewMode: Calendar layout. (Default: Week)
WeekText
String: Gets or sets the localized override for the "Week" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
WorkWeekText
String: Gets or sets the localized override for the "Work week" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.
Methods
Dispose(disposing)
Releases model subscriptions when the control is disposed.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true to release managed and unmanaged resources; false to release only unmanaged resources. |
GetOccurrences()
Returns the visible occurrences in chronological order.
Returns: IReadOnlyList<SchedulerAppointmentEventArgs>. Visible occurrence descriptions.
Results retain the source appointment and expanded dates. Rules use the original day of month, clamped to the target month, without cumulative end-of-month drift. Invalid zero or negative appointment durations are ignored until corrected.
Navigate(direction)
Navigates one visible period forward or backward.
| Parameter | Type | Description |
|---|---|---|
| direction | Int32 | Either -1 for previous or 1 for next. |
OnAppointmentClick(e)
Raises the AppointmentClick event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentEventArgs | The event data. |
OnAppointmentCreating(e)
Raises the AppointmentCreating event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentChangingEventArgs | The event data. |
OnAppointmentDoubleClick(e)
Raises the AppointmentDoubleClick event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentEventArgs | The event data. |
OnAppointmentMoved(e)
Raises the AppointmentMoved event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentEventArgs | The event data. |
OnAppointmentMoving(e)
Raises the AppointmentMoving event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentChangingEventArgs | The event data. |
OnAppointmentResized(e)
Raises the AppointmentResized event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentEventArgs | The event data. |
OnAppointmentResizing(e)
Raises the AppointmentResizing event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerAppointmentChangingEventArgs | The event data. |
OnRangeChanged(e)
Raises the RangeChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnSlotDoubleClick(e)
Raises the SlotDoubleClick event.
| Parameter | Type | Description |
|---|---|---|
| e | SchedulerSlotEventArgs | The event data. |
OnViewChanged(e)
Raises the ViewChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnWebEvent(e)
Dispatches browser requests to server validation methods.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | The event data. |
OnWebRender(config)
Renders first-level options and the visible occurrence snapshot.
| Parameter | Type | Description |
|---|---|---|
| config | Object | The config passed to the operation. |
Today()
Navigates to the current application date.
Events
AppointmentClick
EventHandler<SchedulerAppointmentEventArgs> Occurs when an appointment is activated.
AppointmentCreating
EventHandler<SchedulerAppointmentChangingEventArgs> Occurs before a dragged range becomes an appointment; set Cancel to reject it.
AppointmentDoubleClick
EventHandler<SchedulerAppointmentEventArgs> Occurs when an appointment is double-clicked.
AppointmentMoved
EventHandler<SchedulerAppointmentEventArgs> Occurs after an occurrence is moved.
AppointmentMoving
EventHandler<SchedulerAppointmentChangingEventArgs> Occurs before an occurrence is moved; set Cancel to reject it.
AppointmentResized
EventHandler<SchedulerAppointmentEventArgs> Occurs after an occurrence is resized.
AppointmentResizing
EventHandler<SchedulerAppointmentChangingEventArgs> Occurs before an occurrence is resized; set Cancel to reject it.
RangeChanged
EventHandler<EventArgs> Occurs after the visible date range changes.
SlotDoubleClick
EventHandler<SchedulerSlotEventArgs> Occurs when an empty slot is double-clicked or activated with Enter.
ViewChanged
EventHandler<EventArgs> Occurs after the calendar layout changes.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |