My main window has spawned a child window that's positioned on top to look like part of the main. I would like to move the child window in sync with the main but I'm not sure how.
My main window has my own title bar which event MouseLeftButtonDown calls this function:
public void DragWindow(object sender, MouseButtonEventArgs args)
{
DragMove();
UpdateChildWindowPosition();
}
This results in DragMove() executing on the main window moves the main window alone as I drag the title bar. UpdateChildWindowPosition() is not executed until I release the mouse at which it reads some element coordinates and sets the child window position - you see the child window snap to the location which is not desired.
How can I have the child window move in sync with the main window?