Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi,

I a working on GridControl and by somehow the ApplicationCommands Copy/Cut/Paste do not work with GridControl. I tried looking into the GridControlBase source code to check if I did anything conflicts with the grid. All seem fine. But I found something that might be a bug in

GridControlBase.


The construction method of
GridControlBase is like underneath. That means
CommandManager.RegisterClassCommandBinding is called every time a grid created. So, if the user uses grids e.g 100 times, that method will be called 100 times and therefore adding 100 CommandBindings into the collection (inside CommandManager). Things will be worse if the users use grids more.


public GridControlBase()

{

// ...

CommandManager.RegisterClassCommandBinding(typeof(GridControlBase), new CommandBinding(ApplicationCommands.Copy, OnExecutedCopy, OnCanExecuteCopy));

CommandManager.RegisterClassCommandBinding(typeof(GridControlBase), new CommandBinding(ApplicationCommands.Cut, OnExecutedCut, OnCanExecuteCut));

CommandManager.RegisterClassCommandBinding(typeof(GridControlBase), new CommandBinding(ApplicationCommands.Paste, OnExecutedPaste, OnCanExecutePaste));

CommandManager.RegisterClassCommandBinding(typeof(GridControlBase), new CommandBinding(ApplicationCommands.Undo, OnExecuteUndo, OnCanExecuteUndo));

CommandManager.RegisterClassCommandBinding(typeof(GridControlBase), new CommandBinding(ApplicationCommands.Redo, OnExecuteRedo, OnCanExecuteRedo));

}