Back to Devexpress

How to: Customize Appointment Appearance

wpf-116758-controls-and-libraries-scheduler-examples-how-to-customize-appointment-appearance.md

latest1.7 KB
Original Source

How to: Customize Appointment Appearance

  • Nov 29, 2023
  • 3 minutes to read

The following example provides a step-by-step instruction on how to customize the appointment appearance using a data template.

View Example: Customize Appointment Appearance

Create an Appointment Template

  1. Create a new DataTemplate object in the resources section.

  2. This template displays a custom image on a certain condition. If the FirstVisit custom property of an appointment is true , the icon appears.

  3. Create a markup extension to the ConditionToImageSourceConverter class to provide the value for the Binding.Converter property:

  4. Create a new Style object in the resources section. The following code shows a sample style:

  5. In XAML, use the AppointmentContentTemplate and AppointmentStyle properties of a desired View to apply the created template and style to appointments. The code snippet below shows how to apply the template and style to a DayView :

View the Result

As a result, appointments appear as shown on the image below:

See Also

Appearance Customization

Visual Appointment