public void OnViewportMouseDown(object sender, MouseButtonEventArgs args) { var pt = args.GetPosition(mainViewport); switch (args.ChangedButton) { case MouseButton.Left: m_transformMatrix.OnLBtnDown(pt); // rotate 3d model break; case MouseButton.Right: m_transformMatrix.OnRBtnDown(pt); //drag 3d model break; case MouseButton.Middle: m_transformMatrix.OnMBtnDown(); TransformChart(); break; case MouseButton.XButton1: case MouseButton.XButton2: //m_selectRect.OnMouseDown(pt, mainViewport, m_nRectModelIndex);// select rect break; } }