Hi,
I have a Canvas which is present in a usercontrol, I have attached the DoubleClick event to this user control like this
mainWindow.CanvasLayout.MouseDoubleClick +=
new MouseButtonEventHandler(CanvasLayout_MouseDoubleClick);
I am usign this event handler to achieve fullscreen functionality.
Now, canvas can have various controls placed inside it. Drag and drop functionality is implemented for these controls similar to this codeplex article -
http://www.codeproject.com/KB/WPF/WpfDragAndDropSmorgasbord.aspx
Basically i handles these events for a control -
this._dragSource.PreviewMouseLeftButtonDown +=
new MouseButtonEventHandler(DragSource_PreviewMouseLeftButtonDown);
this._dragSource.PreviewMouseMove +=
new System.Windows.Input.MouseEventHandler(DragSource_PreviewMouseMove);
this._dragSource.PreviewMouseLeftButtonUp +=
new MouseButtonEventHandler(DragSource_PreviewMouseLeftButtonUp);
Now, when user double click on a control(present in canvas) both double click(FullScreen) and single click(drag & drop) operations are performed, i.e. if user double click on control and change its mouse position quickly, control position is changed(its draggeed and dropped to new position).
Is there any way I can prevent drag and drop operation when user double clicks on a control?