Back to Devexpress

AppointmentDisplayTextEventArgs.Text Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointmentdisplaytexteventargs-50434d95.md

latest5.1 KB
Original Source

AppointmentDisplayTextEventArgs.Text Property

Gets or sets the text that will be displayed as the appointment’s text (subject and location together).

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public string Text { get; set; }
vb
Public Property Text As String

Property Value

TypeDescription
String

A String value which represents the displayed text of the appointment.

|

Remarks

Handle the SchedulerControl.InitAppointmentDisplayText event and then use the Text property to customize the text of the appointment before it is displayed. To change the displayed description of the appointment, the AppointmentDisplayTextEventArgs.Description property should be used.

Note

The current appointment to be displayed can be accessed via the AppointmentEventArgs.Appointment property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Text 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#L164

csharp
if (e.ViewInfo is VerticalAppointmentViewInfo && e.Appointment.CustomFields["ApptAddInfo"] != null) {
    e.Text = e.Appointment.Subject + "\r\n";
    e.Text += "------\r\n";

xaf-how-to-display-an-event-with-custom-fields-in-a-scheduler-list-view/CS/EFCore/ExtendedEvents.Win/Controllers/SchedulerCustomFieldMappingsController.cs#L37

csharp
var referencePropertyValue = ((CustomReferenceTypeField)appointment.CustomFields["ReferenceField"])?.Name;
    e.Text = $"{appointment.CustomFields["SimpleField"]} - {referencePropertyValue}";
}

winforms-scheduler-custom-draw-appointments/CS/CustomDrawDemo/Form1.cs#L127

csharp
builder.Append(string.Concat("<color=", r.Next(0, 255), ",", r.Next(0, 255), ",", r.Next(0, 255), ">", str, " ", "</color>"));
    e.Text = builder.ToString();
}

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

vb
If TypeOf e.ViewInfo Is VerticalAppointmentViewInfo AndAlso e.Appointment.CustomFields("ApptAddInfo") IsNot Nothing Then
    e.Text = e.Appointment.Subject & Microsoft.VisualBasic.Constants.vbCrLf
    e.Text += "------" & Microsoft.VisualBasic.Constants.vbCrLf

winforms-scheduler-custom-draw-appointments/VB/CustomDrawDemo/Form1.vb#L126

vb
Next str
    e.Text = builder.ToString()
End Sub

See Also

AppointmentDisplayTextEventArgs Class

AppointmentDisplayTextEventArgs Members

DevExpress.XtraScheduler Namespace