Drag-n-Drop support for SmartParts

Topics: CAB & Smart Client Software Factory
Nov 30, 2005 at 2:56 AM
originally posted by: obiwan

What would it take to let SmartParts be dragged and dropped onto a workspace. I'm just starting using the CAB and I would like to make a win app that is customizable similar to the way WebParts work. I'm trying to build a MIDI control app that is cutomizable (by the user) for each MIDI-device. The layout and SmartPart settings should then be saved into some sort of device definition file.

One problem is that a SmartPart is not really one thing, but a view, presenter and a workitem. But the workitem can be shared across other views and presenters (right?). So maybe we need to have a dedicated workitem for each SmartPart. If you need to share state, just insert a parent workitem during module init.

I think of the Workspace as the "WebPartZone": the place that hosts the Smartparts and would be both the source and target for draggin' and droppin' Smartparts. Of course some sort of SmartPart Catalog should be build to contain all the SmartParts that are installed (but not used). For my app I also need a way to make a custom catalog that contains only SmartParts that are suitable for a specific MIDI-device.

It would probably also mean that you would need some sort of standard SmartPart-dragndrop interface to standardize communication with the SmartParts workitem, controller (presenter) and view. This functionality would resemble some of the code used in the Module Init. We probably could get away with a generic SmartPart-dragndrop handler but this should be customizable by the Module/SmartPart.

I would be very interested in (code design) hints and pointers -especially from the CAB-team- on how to implement this functionality.

Thanx.
Marc Jacobi.