corelibraries-devexpress-dot-xtrascheduler-dot-appointmentdisplayoptions-f61fe73e.md
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
[DefaultValue(false)]
public bool AppointmentAutoHeight { get; set; }
<DefaultValue(False)>
Public Property AppointmentAutoHeight As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true to enable auto-height; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AppointmentAutoHeight |
|---|---|
| SchedulerViewInfoBase |
.AppointmentDisplayOptions .AppointmentAutoHeight
| | TimeCellsControlBase |
.AppointmentDisplayOptions .AppointmentAutoHeight
| | SchedulerViewBase |
.AppointmentDisplayOptions .AppointmentAutoHeight
|
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.
settings.Views.MonthView.CellAutoHeightOptions.Mode = AutoHeightMode.FitToContent;
settings.Views.MonthView.AppointmentDisplayOptions.AppointmentAutoHeight = true;
settings.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = AppointmentTimeDisplayType.Clock;
schedulerControl1.TimelineView.AppointmentDisplayOptions.AppointmentAutoHeight = true;
settings.Views.MonthView.CellAutoHeightOptions.Mode = AutoHeightMode.FitToContent
settings.Views.MonthView.AppointmentDisplayOptions.AppointmentAutoHeight = True
settings.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = AppointmentTimeDisplayType.Clock
schedulerControl1.TimelineView.Scales.Add(New TimeScaleHour())
schedulerControl1.TimelineView.AppointmentDisplayOptions.AppointmentAutoHeight = True
schedulerControl1.ActiveViewType = SchedulerViewType.Day
See Also
AppointmentDisplayOptions Class