private void LogoutButton_Click(object sender, System.Windows.RoutedEventArgs e) { CreateNewMessageButton.IsEnabled = false; CreateNewMessageButton.Opacity = 0; LogOutButton.IsEnabled = false; LogOutButton.Opacity = 0; Session.LogOut(); CurrentWorkSpace.Content = new TestLoginWindow(CurrentWorkSpace); }