I have a xamTree in which I make the leaf nodes drag-able.
I have silverlight acceptance tests that can look at the xamtree to validate it has the proper data, and I would like to validate it is drag-able. Is there anyway to check if the dragsource/target is on an element?
Hi,
You can use DragDropManager.GetDragSource(DependencyObject) mehod. It returns the instance of the DragSource object attached to passed as parameter DependencyObject if any. If you have used data template to make items drag-able you need to examine the visual tree of the XamTreeItem instance in order to find visual child with DragSource object attached to it and then check the value of DragSource.IsDraggable property.
Regards.Plamen.