I am evaluating GoXam with Silverlight 4.
Looks like drag and drop form Palette does not work;
I cannot drag nodes in my Palette. On the Diagram, however, drag and drop works fine;
Not only Palette drag/drop doesn’t work in my application, it does not work in provided examples.
Does anybody experience the same problem with Silverlight 4?
We’ve had to make some changes to get our implementation of drag-and-drop to work in Silverlight 4.
If you don’t mind trying out some alpha-quality software of GoSilverlight version 1.1, I can send you a pointer.
Are you using Visual Studio 2010 beta2?
Walter, I would be great if I could try your alpha.
I am using VS2010 beta 2
I’ve sent you mail.
Walter,
I’ve tried the build you’ve send my way,
Drag-Drop form the “palette” diagram works fine, at least “drop” part.
When I start dragging, though, no “drag” icon appears
By default Palettes are read-only, so the user cannot drop within the Palette.
It would have been nice to be able to show a “no drop allowed” cursor, as we do in WPF, but that isn’t one of the choices of the Cursors static class.
I suppose we could have cobbled together some alternative hack, but we haven’t had time for that.
Walter,
Thank you for you answer
One more question about drag and drop. I am sure the answer is simple, I probably didn’t do it right.
I have several diagrams and each diagram’s Model has different type of Node Data and Link Data. To be able to perform drag and drop between diagram I’ve extended Part Manager, override CopyParts method and implemented ICopyDictionary and Copy collection to create a ‘link’ between different models.
Execution of “Drop” operation seems file, it goes through my implementation as I would expect it to go, I don’t have any exceptions, but after completion of the operation, no new node data is added to the target Model’s Node collection.
I believe overriding PartManager.CopyParts is the right thing to do.
So you implemented your own ICopyDictionary? That probably wasn’t necessary – you could use the one returned by UniversalGraphLinksModel.CreateCopyDictionary() or UniversalGraphModel.CreateCopyDictionary(). (Don’t forget to set their DestinationModel property to refer to your model.) The Universal…Models use Object as the parameterized NodeType, so they and their CopyDictionaries can hold any kind of data, including the different types that your two (or more) models use.
Are you sure that your CopyParts method is actually adding data to the destination model, just as IDiagramModel.AddCollectionCopy would normally do when the data types for the source and destination models were the same?
If you directly modify the destination model the way you want, you won’t need to define any implementation of IDataCollection either.
Walter,
Thank you very much for your answer.
I’ve implemented my own ICopyDictionary because I wanted to avoid general "object’ parametrization. I will try to change my implementation to modify the target model directly.