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

Drag and Drop without holding shift / ctrl keys

3 Answers 75 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
chandrasekhar
Top achievements
Rank 1
chandrasekhar asked on 24 Feb 2011, 03:44 PM
Hi,
i am displaying pdf pages in list view. In same page i have another list view. So i want to drag and drop multiple pages from one list view to another listview.
To select multiple pages i needs to hold either shift or ctrl key. i am ok with this.
But i dont want to hold either shift key or ctrl key while drag and drop.

Please help me out from this problem.

Thanks,
Chandu

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 25 Feb 2011, 11:09 AM
Hi chandrasekhar,

Could please share some additional information about your scenario. I am unsure how you display pdf pages in Silverlight as well as the ListView control you are using.

Greetings,
Tsvyatko
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
chandrasekhar
Top achievements
Rank 1
answered on 25 Feb 2011, 11:41 AM
.xmal
<xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls">
<DataTemplate x:Key="PageTemplate" >
            <StackPanel Orientation="Vertical" Margin="5"
                        dragDrop:RadDragAndDropManager.AllowDrag="True" dragDrop:RadDragAndDropManager.AllowDrop="True">
            </StackPanel>
</DataTemplate>
<DataTemplate x:Key="PageDragTemplate">
            <ListBox x:Name="lstSourceDocumentThumbs"  Style="{StaticResource draggableListBox}"  SelectionMode="Multiple" ItemsSource ="{Binding}"  ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"  Margin="0" ItemTemplate="{StaticResource dragTemplate}">
              </ListBox>
        </DataTemplate>

Like that i have two list boxes. Left side and right side. In left side listbox i binded pdf pages. i want to drag and drop pdf pages from left side list box to right listbox.

.xmal.cs
private void lstSourceDocumentThumbs_OnDragQuery(object sender, DragDropQueryEventArgs e)
       {
}


For multiselection i have to hold shift/ctrl key. But at the time of drag and drop i dont want to hold down either shift or ctrl key.
0
Tsvyatko
Telerik team
answered on 25 Feb 2011, 03:06 PM
Hello chandrasekhar,

You might want to check this forum thread and the sample project attached. It demonstrates how enable dragging multiple items from listbox.

All the best,
Tsvyatko
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
DragAndDrop
Asked by
chandrasekhar
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
chandrasekhar
Top achievements
Rank 1
Share this question
or