Skip to main content

AppointmentLabel Class

Specifies an appointment's identification label.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v14.2.dll

#Declaration

public class AppointmentLabel :
    AppointmentLabelBase,
    IPlatformUserInterfaceObject,
    IUserInterfaceObject

#Remarks

The AppointmentLabel object is an individual identification label which can be associated with an appointment. The identification label is one of an appointment's basic visual characteristics. It is used for at-a-glance appointment identification. The appointment's identification label is indicated in the scheduler control as a background color which is used to fill the client region of the rectangle that is occupied by the appointment. The color of each individual identification label object can be set via its AppointmentLabel.Color property.

DXScheduler_AppointmentLabel

Identification label objects are contained within the AppointmentLabelCollection collection, which can be accessed via the AppointmentStorage.Labels property.

To associate an appointment with a particular identification label specified by its index within the AppointmentStorage.Labels collection, use the appointment's Appointment.LabelId property (for example, see How to: Set Default Values for a New Appointment).

#Examples

This example demonstrates how to add items to the collection of appointment labels within the appointment storage using the AppointmentStorage.Labels property.

<dxsch:SchedulerStorage.AppointmentStorage>
    <dxsch:AppointmentStorage>
        <dxsch:AppointmentStorage.Labels>
            <dxsch:AppointmentLabel Color="Aqua" DisplayName="Lunch Time" MenuCaption="Lunch Time"/>
            <dxsch:AppointmentLabel Color="Violet" DisplayName="Meeting" MenuCaption="Meeting"/>
            <dxsch:AppointmentLabel Color="Yellow" DisplayName="Presentation" MenuCaption="Presentation"/>
        </dxsch:AppointmentStorage.Labels>
    </dxsch:AppointmentStorage>
</dxsch:SchedulerStorage.AppointmentStorage>

#Inheritance

Object
UserInterfaceObject
DevExpress.XtraScheduler.AppointmentLabelBase
AppointmentLabel
See Also