Example #1
0
        private void DataGridPasteCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            DataGrid dg = sender as DataGrid;

            if (dg == null)
            {
                return;
            }
            CharacterViewModel model = dg.DataContext as CharacterViewModel;

            e.CanExecute = model != null && ClipboardHelper.CanPasteAttributeString(ClipboardHelper.REIAA2_ATTRFLAG);
            e.Handled    = true;
        }
Example #2
0
 private void PasteCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = ClipboardHelper.CanPasteAttributeString(ClipboardHelper.REIAA2_SUITFLAG);
     e.Handled    = true;
 }