rene12358
Feb 3rd, 2009, 10:46 AM
Hi,
My application contains 3 tab. Everything including tabcontrol, canvas, etc is done using vb code. And the dragging of canvas is in the 2nd tab.
I used this website as a reference for the drag canvas.
http://blogs.msdn.com/marcelolr/archive/2006/03/02/542641.aspx
There is no error in my application. But when I debug my application, I could not click on the 2nd and 3rd tab.
But when I comment the coding below, I can click on the 2nd and 3rd tab:
Private Sub MyCanvas_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles MyCanvas.PreviewMouseLeftButtonDown
If MyCanvas Is e.Source Then
Exit Sub
End If
m_IsDown = True
m_StartPoint = e.GetPosition(MyCanvas)
m_OriginalElement = e.Source
MyCanvas.CaptureMouse()
e.Handled = True
End Sub
Anyone know how to solve it...? I'm using WPF application.
Thanks
My application contains 3 tab. Everything including tabcontrol, canvas, etc is done using vb code. And the dragging of canvas is in the 2nd tab.
I used this website as a reference for the drag canvas.
http://blogs.msdn.com/marcelolr/archive/2006/03/02/542641.aspx
There is no error in my application. But when I debug my application, I could not click on the 2nd and 3rd tab.
But when I comment the coding below, I can click on the 2nd and 3rd tab:
Private Sub MyCanvas_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles MyCanvas.PreviewMouseLeftButtonDown
If MyCanvas Is e.Source Then
Exit Sub
End If
m_IsDown = True
m_StartPoint = e.GetPosition(MyCanvas)
m_OriginalElement = e.Source
MyCanvas.CaptureMouse()
e.Handled = True
End Sub
Anyone know how to solve it...? I'm using WPF application.
Thanks