I've subclassed the TreeNode class and created:
NodeAbstract : TreeNode
NodeFolder : NodeAbstract
NodeFile : NodeAbstract
The nodes have been added to a Treeview.
Now, I would like to do a drag and drop between nodes inside the
treeview.
I reference all the nodes with the type NodeAbstract although the
nodes are of type NodeFile or NodeFolder.
When I do the drag and drop I use the following code
if (e.Data.GetDataPresent("NodeAbstract"))
//DO something
but it doesn't work because the node is of type NodeFolder or
NodeFile.
How can I solve the problem? I need the code to be executed if the
element inherits from NodeAbstract.
Thanks a lot.