Пример #1
0
            private void ExecPasteAppend(object sender, ExecutedRoutedEventArgs e)
            {
                var window      = new PasteAppendWindow();
                var columns     = PastableColumns.ToArray();
                var dataToPaste = window.Show(DataPresenter, columns);

                if (dataToPaste != null)
                {
                    PasteAppend(columns, dataToPaste);
                }
                DataPresenter.Scrollable.EnsureCurrentRowVisible();
                e.Handled = true;
            }
Пример #2
0
 private void CanExecPasteAppend(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = TabularText.CanPasteFromClipboard && !DataPresenter.IsEditing && !DataPresenter.IsRecursive &&
                    DataPresenter.LayoutOrientation.HasValue && CurrentRow != null && CurrentRow.IsVirtual && PastableColumns.Any();
     if (!e.CanExecute)
     {
         e.ContinueRouting = true;
     }
 }