This is expected. When the EditTriggers
property is set to CellClick
and you click on the cell it enters edit mode. That is why you can not use the CopyingCellClipboardContent
event. When the GridViewDataColumn
cell is in edit mode the default editor for it is a TextBox.
This means that the copying event is handled by the WPF TextBox
element and not the GridView
. A possible approach is to
attach to RoutedEvent
to the Window
and handle the ExecutetedEvent
of the CommandManager and then check if the execute command is an ApplicationCommands.Copy.
sender, RoutedEventArgs e)
ExecutedRoutedEventArgs).Command == ApplicationCommands.Copy)
Please let us know if this helps.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.