WPF拖放到DataGrid [英] WPF drag and drop to DataGrid
问题描述
我一直在互联网高低搜索,但找不到可以帮助我的一些例子。
我正在开发一个在wpf中的应用程序我使用一个 DataGrid
;每个单元格都有一个 DataTemplate
与图像,以马赛克风格;在网格的一边,我有一些瓷砖在网格上使用。
我可以拖动瓷砖,但不能将它们放在网格上,因为我找不到使细胞下降的细胞。有没有办法从拖动事件中获取单元格位置?
谢谢
看看这些:
- 拖动
删除 - 使用数据
对象 - 拖放操作
主题 - 拖放
样本 - 使用拖动移动WPF DataGrid行和
删除 - MVVM和WPF DataGrid w / demo
应用程序 - DataGrid Tips&技巧:行拖
删除
这应该让你到你需要的地方。 >
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
Take a look at these:
- Drag and Drop
- Working with Data Objects
- Drag and Drop How-to Topics
- Drag and Drop Samples
- Moving WPF DataGrid Rows using Drag and Drop
- MVVM and the WPF DataGrid w/ demo app
- DataGrid Tips & Tricks: Row Drag & Drop
That should get you to where you need to be.
这篇关于WPF拖放到DataGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!