Skip to main content

Statuses

  • 2 minutes to read

Overview

The appointment’s availability (busy) status is an object that is used to categorize appointments. The scheduler displays statuses as a strip on an appointment rectangle’s left side colored according to the status type.

The image below shows appointments with different statuses. Users can click Show Time As in the context menu to change the appointment’s status.

WPFScheduler_Status_ShowTimeAs

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

Set the ShowAppointmentStatus property to false to hide statuses.

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.

Bind to Data

Use the DataSource.AppointmentStatusesSource property to bind statuses to a data source. Map data fields to status properties using the AppointmentStatusMappings settings.

See Also