Back to Devexpress

AppointmentDisplayOptions.AppointmentAutoHeight Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointmentdisplayoptions-f61fe73e.md

latest5.7 KB
Original Source

AppointmentDisplayOptions.AppointmentAutoHeight Property

Gets or sets whether an appointment should change its height to fit the text to display.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
[DefaultValue(false)]
public bool AppointmentAutoHeight { get; set; }
vb
<DefaultValue(False)>
Public Property AppointmentAutoHeight As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to enable auto-height; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AppointmentAutoHeight
SchedulerViewInfoBase

.AppointmentDisplayOptions .AppointmentAutoHeight

| | TimeCellsControlBase |

.AppointmentDisplayOptions .AppointmentAutoHeight

| | SchedulerViewBase |

.AppointmentDisplayOptions .AppointmentAutoHeight

|

Remarks

In Day View, Work Week View or Full Week View, the height of an appointment depends on its duration (if the appointment does not occupy the whole day). The AppointmentAutoHeight property affect only to the Appointment.AllDay type appointments in those views.

Note

Disable the AppointmentAutoHeight option in a TimeLine View (if it displays many resources) to avoid flickering while dragging appointments.

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

asp-net-mvc-scheduler-fetch-appointment-event/CS/DevExpressMvcSchedulerFetchAppointments/Models/SchedulerSettingsHelper.cs#L32

csharp
settings.Views.MonthView.CellAutoHeightOptions.Mode = AutoHeightMode.FitToContent;
settings.Views.MonthView.AppointmentDisplayOptions.AppointmentAutoHeight = true;
settings.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = AppointmentTimeDisplayType.Clock;

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

csharp
schedulerControl1.TimelineView.AppointmentDisplayOptions.AppointmentAutoHeight = true;

asp-net-mvc-scheduler-fetch-appointment-event/VB/DevExpressMvcSchedulerFetchAppointments/Models/SchedulerSettingsHelper.vb#L30

vb
settings.Views.MonthView.CellAutoHeightOptions.Mode = AutoHeightMode.FitToContent
settings.Views.MonthView.AppointmentDisplayOptions.AppointmentAutoHeight = True
settings.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = AppointmentTimeDisplayType.Clock

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

vb
schedulerControl1.TimelineView.Scales.Add(New TimeScaleHour())
schedulerControl1.TimelineView.AppointmentDisplayOptions.AppointmentAutoHeight = True
schedulerControl1.ActiveViewType = SchedulerViewType.Day

See Also

AppointmentDisplayOptions Class

AppointmentDisplayOptions Members

DevExpress.XtraScheduler Namespace