WPF drag and drop to DataGrid

偶尔善良 提交于 2019-12-17 22:35:40

问题


I have been searching the internet high and low but can't find some examples that can help me.

I'm developing an application in wpf, in it I use a DataGrid; each cell has 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 them 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


回答1:


Take a look at these:

  1. Drag and Drop
  2. Working with Data Objects
  3. Drag and Drop How-to Topics
  4. Drag and Drop Samples
  5. Moving WPF DataGrid Rows using Drag and Drop
  6. MVVM and the WPF DataGrid w/ demo app
  7. DataGrid Tips & Tricks: Row Drag & Drop

That should get you to where you need to be.



来源:https://stackoverflow.com/questions/2534040/wpf-drag-and-drop-to-datagrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!