Statuses

  • 2 minutes to read

Overview

The appointment's availability (busy) status ois an object that is used to categorize appointments. The status is indicated in the scheduler as a strip on an appointment rectangle's left side and is colored according to the status type.

The image below shows appointments with different statuses. An end-user can change the appointment's status in the context menu by clicking Show Time As.

WPFScheduler_Status_ShowTimeAs

A status is an AppointmentStatusItem class instance that is assigned to an appointment using the AppointmentItem.StatusId property. All statuses are contained in the SchedulerControl.StatusItems collection.

Default Statuses

The SchedulerControl.StatusItems collection includes the following statuses by default:

<dxsch:SchedulerControl.StatusItems>
    <dxsch:AppointmentStatusItem BrushName="{x:Static dxsch:DefaultBrushNames.StatusFree}" Caption="{dxsch:SchedulerLocalizer StringId=Caption_Free}" Id="{x:Static dxsch:DefaultItemIds.StatusFree}"/>
    <dxsch:AppointmentStatusItem BrushName="{x:Static dxsch:DefaultBrushNames.StatusTentative}" Caption="{dxsch:SchedulerLocalizer StringId=Caption_Tentative}" Id="{x:Static dxsch:DefaultItemIds.StatusTentative}"/>
    <dxsch:AppointmentStatusItem BrushName="{x:Static dxsch:DefaultBrushNames.StatusBusy}" Caption="{dxsch:SchedulerLocalizer StringId=Caption_Busy}" Id="{x:Static dxsch:DefaultItemIds.StatusBusy}"/>
    <dxsch:AppointmentStatusItem BrushName="{x:Static dxsch:DefaultBrushNames.StatusOutOfOffice}" Caption="{dxsch:SchedulerLocalizer StringId=Caption_OutOfOffice}" Id="{x:Static dxsch:DefaultItemIds.StatusOutOfOffice}"/>
</dxsch:SchedulerControl.StatusItems>

You can generate this XAML snippet by clicking the Create Status Items item in the scheduler's Smart Tag.

See the Appearance Customization topic for information on how to customize brushes associated with statuses.

TIP

Handle the SchedulerControl.InitNewAppointment event to initialize all newly created appointments with a specific status.

Binding to Data

Statuses can be bound to a data source using the DataSource.AppointmentStatusesSource property. Map data fields to status properties using the AppointmentStatusMappings settings.

See Also