# scheduler-drag-and-drop

> SfSchedule with drag-and-drop rescheduling of appointments across time slots and calendar dates.

**Framework:** wpf  **Component:** Scheduler  **Variant:** drag-and-drop

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/wpf/scheduler-drag-and-drop.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.SfScheduler.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/scheduler-drag-and-drop/Scheduler.xaml

```xaml
<UserControl x:Class="syncfusion.schedulerdemos.wpf.DragAndDrop.Scheduler"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:interactivity="http://schemas.microsoft.com/xaml/behaviors"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:local="clr-namespace:syncfusion.schedulerdemos.wpf" Unloaded="OnSampleUnloaded">

    <UserControl.Resources>
        <local:ImageTemplateSelector x:Key="imageTemplateSelector"/>
    </UserControl.Resources>

    <UserControl.DataContext>
        <local:BindingViewModel/>
    </UserControl.DataContext>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <syncfusion:SfScheduler x:Name="Schedule" Grid.Column="1" BorderThickness="1,0,0,0"
                                AllowDrop="True" ItemsSource="{Binding SchedulerAppointmentCollection}"
                                ViewType="Week"
                                AllowedViewTypes="Month,Day,Week,WorkWeek"
                                DisplayDate="{Binding DisplayDate}">
            <syncfusion:SfScheduler.AppointmentMapping>
                <syncfusion:AppointmentMapping
                Subject="EventName"
                StartTime="From"
                EndTime="To"
                AppointmentBackground="Color"
                Foreground="ForegroundColor"
                IsAllDay="IsAllDay"
                StartTimeZone="StartTimeZone"
                EndTimeZone="EndTimeZone"
                Notes="Notes"
                RecurrenceExceptionDates="RecurrenceExceptions"
                RecurrenceRule="RecurrenceRule"
                RecurrenceId="RecurrenceId"/>
            </syncfusion:SfScheduler.AppointmentMapping>
            <syncfusion:SfScheduler.DaysViewSettings>
                <syncfusion:DaysViewSettings MinimumAppointmentDuration="0:30:0"/>
            </syncfusion:SfScheduler.DaysViewSettings>
            <interactivity:Interaction.Triggers>
                <interactivity:EventTrigger EventName="Loaded">
                    <local:SchedulerDragAndDropBehavior TargetObject="{Binding ElementName=listView}"/>
                </interactivity:EventTrigger>
            </interactivity:Interaction.Triggers>
        </syncfusion:SfScheduler>

        <StackPanel>
            <Label Content="To Do" x:Name="label" BorderThickness="0,0,0,0.5" Height="28" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="0,4,0,10" FontWeight="Bold" BorderBrush="{Binding ElementName=listView, Path=BorderBrush}"/>
            <ListView ScrollViewer.HorizontalScrollBarVisibility="Hidden" x:Name="listView" ItemsSource="{Binding ListAppointmentCollection}" IsEnabled="True" AllowDrop="True" HorizontalAlignment="Center" VerticalAlignment="Top" Height="570" Width="235">
                <ListView.Resources>
                    <Style TargetType="GridViewColumnHeader">
                        <Setter Property="Visibility" Value="Collapsed" />
                    </Style>
                </ListView.Resources>
                <ListView.View>
                    <GridView>
                        <GridViewColumn>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Border CornerRadius="3" Background="{Binding Color}" Margin="0,4,0,4" AllowDrop="True">
                                        <Grid Height="65" AllowDrop="True">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="*"/>
                                            </Grid.RowDefinitions>
                                            <WrapPanel>
                                                <TextBlock Margin="5,10,5,5" Width="143" FontWeight="Bold" HorizontalAlignment="Left" AllowDrop="True" Text="{Binding EventName}" Foreground="{Binding ForegroundColor}" FontSize="12"/>
                                                <Label Width="30" ContentTemplate="{Binding EventName, Converter={StaticResource imageTemplateSelector}}" Margin="18,3,0,0"/>
                                            </WrapPanel>
                                            <TextBlock Margin="3,0,0,5" Width="190" HorizontalAlignment="Left" AllowDrop="True" Text="{Binding Notes}" Grid.Row="1" Foreground="{Binding ForegroundColor}" TextWrapping="Wrap" FontSize="10"/>
                                        </Grid>
                                    </Border>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
                <interactivity:Interaction.Triggers>
                    <interactivity:EventTrigger EventName="Loaded">
                        <local:ListViewDragAndDropBehavior TargetObject="{Binding ElementName=Schedule}"/>
                    </interactivity:EventTrigger>
                </interactivity:Interaction.Triggers>
            </ListView>
        </StackPanel>
    </Grid>
</UserControl>

```
