Skip to main content

How to: Customize the In-Place Editor

  • 2 minutes to read

The following example demonstrates how to customize an appointment in-place editor. An in-place editor is activated when an end-user adds a new appointment by pressing the Enter key in selected cells, or edits the selected appointment’s subject by pressing the F2 key, or by clicking on the appointment.

This tutorial consists of the following sections:

Create a New Application

  1. Create a new WPF Application project and open the MainWindow.xaml file in the Visual Studio Designer.
  2. Add the SchedulerControl object to your project. You can do this by dragging the SchedulerControl item from the DX.22.1: Scheduling Toolbox tab to the canvas.


  3. Right-click the SchedulerControl object and select Layout | Reset All in the context menu to stretch the SchedulerControl so that it fills the entire window.

Customize the In-Place Editor

  1. Add the following namespace declarations to the MainWindow.xaml file:

  2. Declare a DataTemplate in the resources section. In this example, the control template uses a TextEdit for editing an appointment’s subject.
  3. Declare a custom style for the required appointment control that should display a custom in-place editor (DayAppointmentControl, AllDayAppointmentControl, MonthAppointmentControl, or TimelineAppointmentControl) and assign the created data template to the control’s EditTemplate property.

    View Example

        <DataTemplate x:Key="myEditor">
            <dxsch:AppointmentInplaceEditorControl Content="{Binding}">
                            Text="{Binding Subject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap" />
        <Style TargetType="dxschv:DayAppointmentControl">
            <Setter Property="EditTemplate" Value="{StaticResource myEditor}" />


Run the application. The following image illustrates the result: