Back to Devexpress

AppointmentViewInfo.Appointment Property

windowsforms-devexpress-dot-xtrascheduler-dot-drawing-dot-appointmentviewinfo-55da46ef.md

latest6.3 KB
Original Source

AppointmentViewInfo.Appointment Property

Provides access to an appointment for which the visual representation has been built.

Namespace : DevExpress.XtraScheduler.Drawing

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public Appointment Appointment { get; }
vb
Public ReadOnly Property Appointment As Appointment

Property Value

TypeDescription
Appointment

An Appointment class instance.

|

Remarks

Do not modify an appointment accessed via the Appointment property. Use this property only to get information on the current appointment. Otherwise, an unhandled exception may be thrown.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Appointment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L64

csharp
private void SchedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e) {
    Appointment apt = e.ViewInfo.Appointment;
    if (apt.HasReminder && apt.Type == AppointmentType.Occurrence && apt.RecurrencePattern != null) {

winforms-scheduler-hit-testing/CS/HitTest/Form1.cs#L46

csharp
{
    Appointment apt = ((AppointmentViewInfo)hitInfo.ViewInfo).Appointment;
    Text = apt.Subject;

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/CS/SchedulerInplaceEditorExample/MyInplaceEditorControl.cs#L14

csharp
public MyInplaceEditorControl(SchedulerInplaceEditorEventArgs inplaceEditorArgs) {
    this.appointment = inplaceEditorArgs.ViewInfo.Appointment;
    this.control = inplaceEditorArgs.Control;

winforms-scheduler-resolve-appointment-conflicts/CS/DXApplication1/Form1.cs#L67

csharp
AppointmentViewInfo viewInfo = (e.ObjectInfo as DevExpress.XtraScheduler.Drawing.AppointmentViewInfo);
Appointment apt = viewInfo.Appointment;
AppointmentBaseCollection allAppointments = scheduler.ActiveView.GetAppointments();

winforms-scheduler-display-custom-tooltips/VB/Form1.vb#L22

vb
If TypeOf toolTipController1.ActiveObject Is AppointmentViewInfo Then
    Dim apt As Appointment = CType(toolTipController1.ActiveObject, AppointmentViewInfo).Appointment
    e.ToolTipType = ToolTipType.SuperTip

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L66

vb
Private Sub SchedulerControl1_AppointmentViewInfoCustomizing(ByVal sender As Object, ByVal e As AppointmentViewInfoCustomizingEventArgs)
    Dim apt As Appointment = e.ViewInfo.Appointment
    If apt.HasReminder AndAlso apt.Type = AppointmentType.Occurrence AndAlso apt.RecurrencePattern IsNot Nothing Then

winforms-scheduler-hit-testing/VB/HitTest/Form1.vb#L44

vb
If hitInfo.HitTest = SchedulerHitTest.AppointmentContent Then
    Dim apt As Appointment = CType(hitInfo.ViewInfo, AppointmentViewInfo).Appointment
    Text = apt.Subject

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/VB/SchedulerInplaceEditorExample/MyInplaceEditorControl.vb#L19

vb
Public Sub New(ByVal inplaceEditorArgs As SchedulerInplaceEditorEventArgs)
    Me.appointment_Renamed = inplaceEditorArgs.ViewInfo.Appointment
    Me.control_Renamed = inplaceEditorArgs.Control

winforms-scheduler-resolve-appointment-conflicts/VB/DXApplication1/Form1.vb#L56

vb
Dim viewInfo As AppointmentViewInfo = TryCast(e.ObjectInfo, DevExpress.XtraScheduler.Drawing.AppointmentViewInfo)
Dim apt As Appointment = viewInfo.Appointment
Dim allAppointments As AppointmentBaseCollection = scheduler.ActiveView.GetAppointments()

See Also

AppointmentViewInfo Class

AppointmentViewInfo Members

DevExpress.XtraScheduler.Drawing Namespace