I have a XamCarouselListBox which displays images. I want to drag and drop these images in other part of the grid.
Where should I create the PreviewMouseLeftButton down, up and mousemove events? On image or on XamCarouselListBox or on Grid.
Can someone please provide some sample code snippet or application?
Hello,
You can take a look at this blog post - http://blogs.infragistics.com/blogs/alex_fidanov/archive/2009/07/28/drag-amp-drop-with-datapresenter-family-controls.aspx.
It shows how to implement drag and drop from a XamDataCarousel, but the approach is practically identical.
Hey I tried but got confused with the whole thing.
My Drag target is Listview and has no DataRecordPresenter. what to do?
How do I get the selected item/image in my XamCarouselListBox during dragging.
XamCarouselListBox is my drag source.
If your target is a ListView, then you have to get a ListViewItem and not a DataRecordPresenter.
The XamCarouselListBox exposes SelectedItem, SelectedIndex and SelectedValue properties that you can use to get the selected item.