Drag and Drop = EASY!!!
At work I had experience with drag and drop in Silverlight through a 3rd party and it wasn't terrible, but it also was no walk in the park. So when I decided I wanted to add the ability for Tony to drag and drop from one grid to another I thought I was digging my own grave. I googled a bit before I started see what the general consensus was and one site deemed it as convoluted and difficult (enough so to merit him creating a custom class to handle it), another poster complained that his events weren't firing. I thought I would be at this for hours, even with a tutorial in hand.
I didn't use it exactly as the tutorial described, there were some thing in the tutorial which were simply wrong (like how it calculated when to start drag and drop) and things I had no need for, but literally, 5 minutes and had it working. I had thought that the 3rd party set of classes I was using at work were making life easier. The package we're using at work has a lot of flashy little features and is easier to integrate customizations into, but it is WAY easier to just borrow the Microsoft classes included in WPF. Now I have integrated my dual pane view so that Tony can look at a product and drag it onto a Work Order and it will create a new line with the description and part number and everything. Going to implement dragging from the Customers and Inventory grids and then implement dropping in the Purchase Orders as well.
I didn't use it exactly as the tutorial described, there were some thing in the tutorial which were simply wrong (like how it calculated when to start drag and drop) and things I had no need for, but literally, 5 minutes and had it working. I had thought that the 3rd party set of classes I was using at work were making life easier. The package we're using at work has a lot of flashy little features and is easier to integrate customizations into, but it is WAY easier to just borrow the Microsoft classes included in WPF. Now I have integrated my dual pane view so that Tony can look at a product and drag it onto a Work Order and it will create a new line with the description and part number and everything. Going to implement dragging from the Customers and Inventory grids and then implement dropping in the Purchase Orders as well.
Comments
Post a Comment