private void ChangeChatMode(object sender, RoutedEventArgs e) { grid.Children.Remove(ChatView); chatButton.Visibility = Visibility.Hidden; chatButton.IsHitTestVisible = false; var wind = new ChatPopup(ChatView, this, ((Button)sender).Tag); wind.Show(); }
void GalleryChat_Loaded(object sender, RoutedEventArgs e) { dataContext = DataContext as MainWindowViewModel; if (dataContext.IsChatWindowOpened) { grid.Children.Remove(ChatView); chatButton.Visibility = Visibility.Hidden; chatButton.IsHitTestVisible = false; var wind = new ChatPopup(ChatView, this, dataContext); wind.Show(); } }