I would like to add Copy functionality to a WPF DataGrid.
In the DataGrid's ContextMenu, you can create a MenuItem and set the MenuItem.Command value to Copy. It's a Command available through the standard ApplicationCommands list, so there won't be any additional code required to have it functional:
<DataGrid>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Command="Copy" />
</ContextMenu>
</DataGrid.ContextMenu>
</DataGrid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With