Back to Devexpress

IAppointmentLabelStorage Interface

corelibraries-devexpress-dot-xtrascheduler-94353a2d.md

latest3.1 KB
Original Source

IAppointmentLabelStorage Interface

An interface that defines a storage which holds appointment labels.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
public interface IAppointmentLabelStorage :
    IStorageCollection<IAppointmentLabel>,
    IEnumerable<IAppointmentLabel>,
    IEnumerable,
    ICollection,
    IDisposable
vb
Public Interface IAppointmentLabelStorage
    Inherits IStorageCollection(Of IAppointmentLabel),
             IEnumerable(Of IAppointmentLabel),
             IEnumerable,
             ICollection,
             IDisposable

The following members return IAppointmentLabelStorage objects:

Remarks

An object with the IAppointmentLabelStorage interface can be accessed using the IAppointmentStorageBase.Labels property or the SchedulerControl.DataStorage.Appointments.Labels notation.

Example

csharp
scheduler.InitAppointmentDisplayText += scheduler_InitAppointmentDisplayText;
    scheduler.ActiveView.LayoutChanged();
public static void scheduler_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e) {
    SchedulerControl scheduler = sender as SchedulerControl;
    IAppointmentLabel label = scheduler.DataStorage.Appointments.Labels.GetById(e.Appointment.LabelKey);
    e.Description = String.Format("Label Info:\nDisplayName = '{0}'\nID = '{1}'", label.DisplayName, label.Id.ToString());
}
vb
AddHandler scheduler.InitAppointmentDisplayText, AddressOf scheduler_InitAppointmentDisplayText
    scheduler.ActiveView.LayoutChanged()
Public Shared Sub scheduler_InitAppointmentDisplayText(ByVal sender As Object, ByVal e As AppointmentDisplayTextEventArgs)
    Dim scheduler As SchedulerControl = TryCast(sender, SchedulerControl)
    Dim label As IAppointmentLabel = scheduler.DataStorage.Appointments.Labels.GetById(e.Appointment.LabelKey)
    e.Description = String.Format("Label Info:" & ControlChars.Lf & "DisplayName = '{0}'" & ControlChars.Lf & "ID = '{1}'", label.DisplayName, label.Id.ToString())
End Sub

See Also

IAppointmentLabelStorage Members

IAppointmentLabel

Labels

DevExpress.XtraScheduler Namespace