Back to Devexpress

AppointmentControl Class

wpf-devexpress-dot-xpf-dot-scheduling-dot-visual-b03efabc.md

latest7.3 KB
Original Source

AppointmentControl Class

A base class for controls that visualize an appointment in a Scheduler view.

Namespace : DevExpress.Xpf.Scheduling.Visual

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public abstract class AppointmentControl :
    AppointmentControlBase,
    IResizableAppointment
vb
Public MustInherit Class AppointmentControl
    Inherits AppointmentControlBase
    Implements IResizableAppointment

Remarks

An AppointmentControl is a content container for appointment information and appointment display options. Appointment information is contained in the AppointmentViewModel object, which is a data context for the AppointmentControl template.

The SchedulerControl uses different AppointmentControl descendants to visualize appointments based on the following settings:

  • The specified view.
  • Whether a user drags the appointment.
  • Whether the appointment is an all-day appointment.

The class diagram of the visual appointment controls is shown below.

Each Scheduler view contains AppointmentContentTemplate and AppointmentContentTemplateSelector properties that allow you to specify a template used to visualize appointment content:

ViewAppointment Template
Day ViewDayViewBase.AppointmentContentTemplate, DayViewBase.AppointmentContentTemplateSelector
Work Week ViewDayViewBase.AppointmentContentTemplate, DayViewBase.AppointmentContentTemplateSelector
Week ViewDayViewBase.AppointmentContentTemplate, DayViewBase.AppointmentContentTemplateSelector
Month ViewMonthView.AppointmentContentTemplate, MonthView.AppointmentContentTemplateSelector
Timeline ViewTimelineView.AppointmentContentTemplate, TimelineView.AppointmentContentTemplateSelector

Tip

To create a template, you can start with the AppointmentContentPanel object, which is a built-in template designed to display appointment information similar to Outlook.

You can use a custom style to specify borders, background, padding and set the following appointment display options:

See the Visual Appointment topic for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AppointmentControl class.

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.

wpf-scheduler-customize-appointment-appearance/CS/CustomizeAppointmentExample/MainWindow.xaml#L55

xml
</DataTemplate>
<Style x:Key="appointmentStyle" TargetType="dxschv:AppointmentControl">
    <Setter Property="ShowInterval" Value="True"/>

Inheritance

Show 16 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement ContentPresenter DevExpress.Xpf.Core.Native.Chrome AppointmentControlBase AppointmentControl AppointmentHorizontalControl

AppointmentVerticalControl

DayAppointmentControl

AllDayAppointmentControl

TimelineAppointmentControl

MonthAppointmentControl

See Also

AppointmentControl Members

Visual Appointment

DevExpress.Xpf.Scheduling.Visual Namespace