i guess if you were really desperate you could use XML data in the string… but since you’re talking of casting anyway, what’s so different about casting the component based on the description string?
More elegant imho.
In my case I m doing a custom TreeView and the dragging part is only handled in the custom TreeViewItem so I might not need to modify the TreeView class.
I’d like to have additional argument “Component *sourceComponent” for isInterestedInDragSource() like other methods because I want to access the data which the source having.
String is not enough to judge whether I need or not. Using XML requires to convert the binary data to XML when start dragging, it will often be hard to do or waste of time, I think.