Two issues when dragging a subtree

I’m using GoXam 1.3.2 and Silverlight 4.
I’ve written a customized dragging tool that allows a user to move a node (and its subtree) to certain other nodes of the tree. I’ve gotten the tool basically working but I have two issues with the visuals.

1) I wanted to have DragOverSnapArea set to Nodes and Inclusions set to Subtree. However, when both are set, all of the nodes in the subtree snap to the stationary node. I was hoping only the subtree's top node would snap to the stationary node. In my override to CanStart, I ensure that only one node is selected; the rest of the subtree (both nodes and links) are automatically added to the DraggedParts collection. To get what I want, I'm thinking I might have to override DoMouseMove to simulate the snap behavior that I'd like but I'm uncertain of how to proceed.
2) If the move is canceled, the node returns to its prior location but the link from the node's parent to the node is modified. The source of this behavior seems directly related to my changing of the z-order of the subtree's top node during the drag (the z-order is increased in DoStart and restored in DoStop). I do this because the subtree's top node must always be above the stationary nodes. I don't have any idea of how to address this second problem.
Thanks for your help, Jeff
  1. If I set Diagram.GridVisible=“True” and GridSnapEnabled=“True” in the IncrementalTree sample, you will see that every node is moved independently to snap to the grid.

I also tried setting go:Node.DropOntoBehavior=“AddsLinkFromNode” in the Node DataTemplate, and on the DraggingTool I set DragOverSnapArea=“DiagramAndNodes” DropOntoEnabled=“True”.

Everything worked the way I expected, and the way I think you intend (although I cannot be sure of that, of course). In any case, all of the dragged nodes did not snap to the same point on the stationary node where the drop occurred.

  1. It’s normal to temporarily move the selected parts into a different layer. For example, define a resource:
    <go:BooleanStringConverter x:Key=“theBooleanLayerConverter” TrueString=“Foreground” FalseString="" />

And then on the root element of your node DataTemplate:
go:Part.LayerName="{Binding Path=Part.IsSelected, Converter={StaticResource theBooleanLayerConverter}}"