# IScheduler Interface

The common [RadzenScheduler<T>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenScheduler-1.md) API injected as a cascading parameter to is views.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Syntax

```csharp
public interface IScheduler
```

## Properties

| Property | Type | Description |
|------|------|-------------|
| AppointmentMove | `EventCallback<SchedulerAppointmentMoveEventArgs>` | Gets or sets the appointment move event callback. |
| AppointmentResize | `EventCallback<SchedulerAppointmentResizeEventArgs>` | Gets or sets the appointment resize event callback. |
| Culture | `Globalization.CultureInfo` | Gets or sets the culture. |
| CurrentDate | `DateTime` | Gets or sets the current date. |
| Height | `double` | Gets the height. |
| Resources | `IList<RadzenSchedulerResource>` | Gets the resource types of the scheduler in order of declaration. Views use them when grouping appointments by resource. |
| UICulture | `Globalization.CultureInfo` | Gets the UI culture used for localized strings. Defaults to Culture. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `AddResource(RadzenSchedulerResource resource)` | `Task` | Adds a resource type. Called when a [RadzenSchedulerResource](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSchedulerResource.md) is initialized. Parameters: `resource`: The resource type to add. |
| `AddView(ISchedulerView view)` | `Task` | Adds a view. Must be called when a [ISchedulerView](https://blazor.radzen.com/docs/api/Radzen.Blazor.ISchedulerView.md) is initialized. Parameters: `view`: The view to add. |
| `GetAppointmentAttributes(AppointmentData item)` | `IDictionary<string, object>` | Gets the appointment HTML attributes. Parameters: `item`: The appointment. Returns: A dictionary containing the HTML attributes for the specified appointment. |
| `GetAppointmentsInRange(DateTime start, DateTime end)` | `IEnumerable<AppointmentData>` | Gets the appointments in the specified range. Parameters: `start`: The start of the range. `end`: The end of the range. Returns: A collection of appointments within the specified range. |
| `GetSlotAttributes(DateTime start, DateTime end, Func<IEnumerable<AppointmentData>> getAppointments)` | `IDictionary<string, object>` | Gets the slot HTML attributes. Parameters: `start`: The start of the slot. `end`: The end of the slot. `getAppointments`: Function to return appointments for this range. Returns: A dictionary containing the HTML attributes for the specified slot. |
| `GetSlotAttributes(DateTime start, DateTime end, Func<IEnumerable<AppointmentData>> getAppointments, IDictionary<string, object> resources)` | `IDictionary<string, object>` | Gets the slot HTML attributes. Parameters: `start`: The start of the slot. `end`: The end of the slot. `getAppointments`: Function to return appointments for this range. Returns: A dictionary containing the HTML attributes for the specified slot. |
| `HasAppointmentMoveDelegate()` | `bool` | Returns true if the scheduler has an AppointmentMove listener. |
| `HasAppointmentResizeDelegate()` | `bool` | Returns true if the scheduler has an AppointmentResize listener. |
| `HasMouseEnterAppointmentDelegate()` | `bool` | Returns true if the scheduler has a mouse enter appointment listener. |
| `IsAppointmentInRange(AppointmentData item, DateTime start, DateTime end)` | `bool` | Determines whether an appointment is within the specified range. Parameters: `item`: The appointment to check. `start`: The start of the range. `end`: The end of the range. Returns: true if the appointment is within the specified range; otherwise, false. |
| `IsSelected(ISchedulerView view)` | `bool` | Determines whether the specified view is selected. Parameters: `view`: The view. Returns: true if the specified view is selected; otherwise, false. |
| `MouseEnterAppointment(ElementReference reference, AppointmentData data)` | `Task` | Notifies the scheduler that the user has moved the mouse over the specified appointment. |
| `MouseEnterAppointment(ElementReference reference, AppointmentData data, double clientX, double clientY)` | `Task` | Notifies the scheduler that the user has moved the mouse over the specified appointment. |
| `MouseLeaveAppointment(ElementReference reference, AppointmentData data)` | `Task` | Notifies the scheduler that the user has moved the mouse out of the specified appointment. |
| `MouseLeaveAppointment(ElementReference reference, AppointmentData data, double clientX, double clientY)` | `Task` | Notifies the scheduler that the user has moved the mouse out of the specified appointment. |
| `Reload()` | `Task` | Reloads this instance. |
| `RemoveResource(RadzenSchedulerResource resource)` | `void` | Removes a resource type. Called when a [RadzenSchedulerResource](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSchedulerResource.md) is disposed. Parameters: `resource`: The resource type to remove. |
| `RemoveView(ISchedulerView view)` | `void` | Removes a view. Must be called when a [ISchedulerView](https://blazor.radzen.com/docs/api/Radzen.Blazor.ISchedulerView.md) is disposed. Parameters: `view`: The view to remove. |
| `RenderAppointment(AppointmentData item)` | `RenderFragment` | Renders the appointment. Parameters: `item`: The item. Returns: RenderFragment. |
| `SelectAppointment(AppointmentData data)` | `Task` | Selects the specified appointment. Parameters: `data`: The appointment to select. |
| `SelectDay(DateTime day, IEnumerable<AppointmentData> appointments)` | `Task` | Selects the specified day. Parameters: `day`: The selected day. `appointments`: The appointments for this range. |
| `SelectMonth(DateTime monthStart, IEnumerable<AppointmentData> appointments)` | `Task` | Selects the specified month. Parameters: `monthStart`: The start of the month. `appointments`: The appointments for this range. |
| `SelectMore(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)` | `Task<bool>` | Selects the specified more link. Parameters: `start`: The start. `end`: The end. `appointments`: The appointments for this range. |
| `SelectSlot(DateTime start, DateTime end)` | `Task` | Selects the specified slot. Parameters: `start`: The start. `end`: The end. |
| `SelectSlot(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)` | `Task<bool>` | Selects the specified slot. Parameters: `start`: The start. `end`: The end. |
| `SelectSlot(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments, IDictionary<string, object> resources)` | `Task<bool>` | Selects the specified slot. Parameters: `start`: The start. `end`: The end. |

