When my WPF application is open, and I open a Remote Desktop Connect to my PC, WPF reloads the application (Unload and Load events on the main control are triggered). When I disconnect, this happens again.
I understand that the UI has to be redrawn, but why is the control reloaded? Can this be prevented? Or is there a way to detect if a reload is triggered by an RDP (dis)connect?