This question is locked. New answers and comments are not allowed.
Hi, I am currently implementing a multiple drag/drop from a GridView to a ListBox. The actual drag and drop operation is working very nicely, but I am having a little issue with the TreeViewDragCue. I am using the following code in the OnDragQuery:
When I drag multiple items, they are displayed in the cue as a verticle stack of items, which is OK for 3 or 4, but when dragging 20 or more, the cue extends off the bottom of the screen which is not so nice to look at, Is there a way of having the cue stack the items 'into' the screen (like a pack of playing cards slightly offset)?
Many thanks.
-- Edit --
So, I understand now why the cue is being shown as it is, the Template is set to:
So, now my question would be what would be a better way of showing the multiple drag cue?
I can limit the number of items added to the ItemSource, but having the stacked vertically is not so nice.
Thanks again.
//Set up a drag cue:
TreeViewDragCue tcue = new TreeViewDragCue();
tcue.ItemTemplate = this.Resources["UserDragTemplate"] as DataTemplate;
tcue.ItemsSource = e.Options.Payload as ObservableCollection<
object
>;
tcue.IsDropPossible = true;
e.Options.DragCue = tcue;
When I drag multiple items, they are displayed in the cue as a verticle stack of items, which is OK for 3 or 4, but when dragging 20 or more, the cue extends off the bottom of the screen which is not so nice to look at, Is there a way of having the cue stack the items 'into' the screen (like a pack of playing cards slightly offset)?
Many thanks.
-- Edit --
So, I understand now why the cue is being shown as it is, the Template is set to:
<
DataTemplate
x:Key
=
"UserDragTemplate"
>
<
StackPanel
Orientation
=
"Vertical"
>
<
Image
Source
=
"{Binding Image}"
Height
=
"30"
Width
=
"30"
/>
<
TextBlock
Text
=
"{Binding Name}"
HorizontalAlignment
=
"Center"
/>
</
StackPanel
>
</
DataTemplate
>
So, now my question would be what would be a better way of showing the multiple drag cue?
I can limit the number of items added to the ItemSource, but having the stacked vertically is not so nice.
Thanks again.