This is a migrated thread and some comments may be shown as answers.

Implementing Drag and Drop from RadTreeView onto Scheduler

1 Answer 59 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sean
Top achievements
Rank 1
Sean asked on 23 May 2011, 03:39 PM
Attached is a project taken from these forums that was provided as a solution to this problem. I can successfully fire an OnDragQuery operation but what I need is to implement OnDropInfo and OnDropQuery using MVVM. Is there an example of this being done?


MVVM Light 3

XAML:
<telerik:RadScheduler Name="scheduler" 
                                          VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" 
                                          AvailableViewModes="Month" 
                                          ShowsConfirmationWindowOnDelete="False" 
                                          Style="{StaticResource RadSchedulerStyle1}" 
                                          AppointmentsSource="{Binding Appointments, Mode=TwoWay}" 
                                          telerikDragDrop:RadDragAndDropManager.AllowDrop="True" AllowDrop="True">
                                            
                        <i:Interaction.Triggers>
  
                            <local:DropQueryRoutedEventTrigger EventName="DropQuery">
                                <cmd:EventToCommand PassEventArgsToCommand="True" Command="{Binding DropQueryCommand, Mode=TwoWay, Source={StaticResource Locator}}" />
                            </local:DropQueryRoutedEventTrigger>
  
                        </i:Interaction.Triggers>
                    </telerik:RadScheduler>


ViewModel:
DropQueryCommand = new RelayCommand<DragDropQueryEventArgs>(DropQuery);
......
  
private void DropQuery(DragDropQueryEventArgs e)
        {
  
        }
  
public RelayCommand<DragDropQueryEventArgs> DropQueryCommand
        {
            get;
            private set;
        }

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 23 May 2011, 04:44 PM
Hi Sean,

 You might want to look at this blog post that illustrates how to achieve drag/drop functionality in MVVM - http://blogs.telerik.com/tsvyatkokonov/posts/10-12-15/using_commands_with_raddraganddropmanager_for_wpf_and_silverlight.aspx

Kind regards,
Tsvyatko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DragAndDrop
Asked by
Sean
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or