The error that is appearing is the following: This Visual is not connected to PresentationSource. \' It happens when I try to undock a window, however this only happens when