views:

528

answers:

1

Hi. I have been searching the internet high and low but can find some examples that can help me, I'm developing an application in wpf, in it I use a datagrid, each cell as a datatemplate with and image, in a mosaic style, on the side of the grid I have some tiles to use on the grid, I'm able to drag the tiles but can't drop then on the grid because I can't find the cell to which make the drop, is there a way to get a cell position from the the drag events? Thanks

+2  A: 

Take a look at this:

Drag and Drop

http://msdn.microsoft.com/en-us/library/ms749074.aspx

Working with Data Objects

http://msdn.microsoft.com/en-us/library/ms742859.aspx#Working_with_Data_Objects

Drag and Drop How-to Topics

http://msdn.microsoft.com/en-us/library/ms746687.aspx

Drag and Drop Samples

http://msdn.microsoft.com/en-us/library/ms771293.aspx

Moving WPF DataGrid Rows using Drag and Drop

http://www.hardcodet.net/2009/03/moving-data-grid-rows-using-drag-and-drop

MVVM and the WPF DataGrid w/ demo app

http://www.codeproject.com/KB/WPF/MVVM_DataGrid.aspx

DataGrid Tips & Tricks: Row Drag & Drop

http://wpf.codeplex.com/wikipage?title=Row%20Drag%20%26%20Drop&ProjectName=wpf

That should get you to where you need to be.

James Campbell
Hi, thanks for the links, they really helped to find the solutions.
Then why dont you mark it as answered?
Aran Mulholland