private void OnUserLogout(object source, EventArgs args) { Dispatcher.Invoke(() => { AfterLogout(); ChatBox.AfterLogout(); LoginScreen.AfterLogout(); Lobby.AfterLogout(); Home.AfterLogout(); Profile.AfterLogout(); }); }