Implementing Drag and Drop from RadTreeView onto Scheduler

2 posts, 0 answers
  1. Sean
    Sean avatar
    8 posts
    Member since:
    Apr 2011

    Posted 23 May 2011 Link to this post

    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;
            }
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 23 May 2011 Link to this post

    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
  3. DevCraft banner
Back to Top