GetTranslationDistances
(
Point currentMouseLocationScreen,
out Double newTranslateX,
out Double newTranslateY
)
{
AssertValid();
// These calculations use screen coordinates for the mouse positions,
// because screen coordindates are not affected by the scale transforms
// used for the control's layout and render transforms. The mouse
// locations reported by the MouseMove event are affected by the
// transforms and would be more difficult to work with.
newTranslateX = m_dMouseDownTranslateX +
(currentMouseLocationScreen.X - m_oMouseDownLocationScreen.X);
newTranslateY = m_dMouseDownTranslateY +
(currentMouseLocationScreen.Y - m_oMouseDownLocationScreen.Y);
}