Back to Devexpress

Appointment.Subject Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-13aeb9fc.md

latest7.3 KB
Original Source

Appointment.Subject Property

Gets or sets the appointment’s subject text.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
string Subject { get; set; }
vb
Property Subject As String

Property Value

TypeDescription
String

A String value that specifies the text of appointment’s subject.

|

Remarks

Use the Subject property to specify the subject text of the appointment. The subject text is one of the main attributes (together with the values of the Appointment.Start, Appointment.End and Appointment.Location properties) which are displayed to identify the appointment within Views of the SchedulerControl.

csharp
apt.Subject = "Appointment Created in Code"; 
apt.Start = DateTime.Now; 
apt.End = DateTime.Now.AddHours(1); 
schedulerDataStorage1.Appointments.Add(apt);
vb
apt.Subject = "Appointment Created in Code"
apt.Start = DateTime.Now
apt.End = DateTime.Now.AddHours(1)
schedulerDataStorage1.Appointments.Add(apt)

The following code snippets (auto-collected from DevExpress Examples) contain references to the Subject 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-sync-with-ews/CS/EWSSyncExample/Synchronizer.cs#L249

csharp
ExchangeAppointment exchangeAppointment = new ExchangeAppointment(service);
exchangeAppointment.Subject = schedulerAppointment.Subject;
exchangeAppointment.Body = schedulerAppointment.Description;

winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L27

csharp
Appointment apt = schedulerStorage1.CreateAppointment(AppointmentType.Pattern);
apt.Subject = "MyTestAppointment";
apt.Start = DateTime.Today.AddHours(10);

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

csharp
Appointment app = schedulerDataStorage1.CreateAppointment(AppointmentType.Normal);
app.Subject = "Created on alert from appointment w/Price = " + e.AlertNotifications[0].ActualAppointment.CustomFields["CustomPrice"];
app.Start = e.AlertNotifications[0].ActualAppointment.Start.AddHours(2);

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

csharp
Appointment apt = schedulerStorage1.CreateAppointment(AppointmentType.Normal);
apt.Subject = "Presentation";
apt.Start = schedulerControl1.Start.Date.AddHours(14);

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

csharp
this.appointmentLabelEdit1.AppointmentLabel = storage.Appointments.Labels.GetById(appointment.LabelKey);
this.edtSubject.Text = appointment.Subject;
this.edtDescription.Text = appointment.Description;

winforms-scheduler-sync-with-ews/VB/EWSSyncExample/Synchronizer.vb#L235

vb
Dim exchangeAppointment As New ExchangeAppointment(service)
exchangeAppointment.Subject = schedulerAppointment.Subject
exchangeAppointment.Body = schedulerAppointment.Description

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

vb
ttiTitle.Text = "Appointment"
ttiBody.Text = String.Format("Subject: {0} " & Microsoft.VisualBasic.Constants.vbLf & "Description: {1}" & Microsoft.VisualBasic.Constants.vbLf & "Price: {2}", apt.Subject, apt.Description, apt.CustomFields("cfPrice"))
ttiBody.Image = SystemIcons.Information.ToBitmap()

winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L25

vb
Dim apt As Appointment = schedulerStorage1.CreateAppointment(AppointmentType.Pattern)
apt.Subject = "MyTestAppointment"
apt.Start = Date.Today.AddHours(10)

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

vb
Dim app As Appointment = schedulerDataStorage1.CreateAppointment(AppointmentType.Normal)
app.Subject = "Created on alert from appointment w/Price = " & e.AlertNotifications(0).ActualAppointment.CustomFields("CustomPrice").ToString()
app.Start = e.AlertNotifications(0).ActualAppointment.Start.AddHours(2)

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

vb
Dim apt As Appointment = schedulerStorage1.CreateAppointment(AppointmentType.Normal)
apt.Subject = "Presentation"
apt.Start = schedulerControl1.Start.Date.AddHours(14)

See Also

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace