public MainWindow() { InitializeComponent(); _previewDialog = new ViewDialog(); _userCollection = new ObservableCollection <User>(); _userCollection.CollectionChanged += (e, v) => DisableButtons(); UsersListBox.ItemsSource = _userCollection; DisableButtons(); }
private void ViewButton_OnClick(object sender, RoutedEventArgs e) { _previewDialog = new ViewDialog(); _previewDialog.User = _userPreview; _previewDialog.Show(); }