Back to Devexpress

AppointmentDisplayTextEventArgs.ViewInfo Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointmentdisplaytexteventargs-bc544682.md

latest3.8 KB
Original Source

AppointmentDisplayTextEventArgs.ViewInfo Property

Provides access to the characteristics of the appointment prepared for display.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public IAppointmentViewInfo ViewInfo { get; }
vb
Public ReadOnly Property ViewInfo As IAppointmentViewInfo

Property Value

TypeDescription
IAppointmentViewInfo

An IAppointmentViewInfo interface defining view characteristics for the appointment.

|

Remarks

Use the DevExpress.XtraScheduler.Drawing.IAppointmentViewInfo.Resource property to determine the resource of the displayed appointment.

The IAppointmentViewInfo.Options property provides access to the AppointmentViewInfoOptions object that allows specifying whether start or end times are displayed, the recurrence symbol is shown etc., selectively.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ViewInfo 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.

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/CS/CustomAppointmentImageAndText/Form1.cs#L163

csharp
// Display custom text in Day and WorkWeek views only (VerticalAppointmentViewInfo).
if (e.ViewInfo is VerticalAppointmentViewInfo && e.Appointment.CustomFields["ApptAddInfo"] != null) {
    e.Text = e.Appointment.Subject + "\r\n";

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/VB/CustomAppointmentImageAndText/Form1.vb#L154

vb
' Display custom text in Day and WorkWeek views only (VerticalAppointmentViewInfo).
If TypeOf e.ViewInfo Is VerticalAppointmentViewInfo AndAlso e.Appointment.CustomFields("ApptAddInfo") IsNot Nothing Then
    e.Text = e.Appointment.Subject & Microsoft.VisualBasic.Constants.vbCrLf

See Also

AppointmentViewInfoOptions

AppointmentDisplayTextEventArgs Class

AppointmentDisplayTextEventArgs Members

DevExpress.XtraScheduler Namespace