protected virtual void OnRowsAdded(RowsAddedEventArgs e) { EventHandler<RowsAddedEventArgs> handler = RowsAdded; if (handler != null) handler(this, e); }
private void WatcherOnRowsAdded(object sender, RowsAddedEventArgs rowsAddedEventArgs) { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { // inject into grid foreach (var row in rowsAddedEventArgs.Rows) { Rows.Add(RowViewModel.Parse(ScutSettings, row)); } })); }
private void WatcherOnRowsAdded(object sender, RowsAddedEventArgs rowsAddedEventArgs) { BeginInvoke(new Action(() => AddRows(rowsAddedEventArgs.Rows))); }
private void WatcherOnFileOpened(object sender, RowsAddedEventArgs rowsAddedEventArgs) { var collection = new ObservableCollection<RowViewModel>(); foreach (var row in rowsAddedEventArgs.Rows) { collection.Add(RowViewModel.Parse(ScutSettings, row)); } Dispatcher.Invoke(() => Rows = collection); }