This though has a side effect. If a user tries to resize (and probably rotate) a scatterviewitem then one finger has to placed on the item and held. This will fire the PreviewContactHoldgesture for that item. So inside the PreviewContactHoldgesture handler, once the item that is being operated on then you need to find the number of contacts on that item. if it's more than one then it's not a plain Hold gesture. Here's the code I used:
int ContactsCaptured=draggedElement.ContactsCaptured.Count;
if (ContactsCaptured > 1){
//We may be rotating or scaling so we don't want to drag and drop
return;
}
No comments:
Post a Comment