This sample illustrates how to capture the clipboard events of WPF Spreadsheet.
You can capture the clipboard operations using the PreviewKeyDown event in the WPF Spreadsheet (SfSpreadsheet) control, in which the copy/paste could be captured using the keyboard shortcuts.
Before running this project, ensure you have the following installed:
- Visual Studio 2019 or later
- .NET Framework 4.6.2 or greater or .NET Core 8.0 or greater
- WPF (Windows Presentation Foundation) + Syncfusion Spreadsheet
Clone this repository to your local machine:
git clone https://github.com/SyncfusionExamples/capture-spreadsheet-events-wpf
cd capture-spreadsheet-events-wpfInstall the required Syncfusion WPF Spreadsheet packages as dependencies:
dotnet add package Syncfusion.SfSpreadsheet.WPF
dotnet add package Syncfusion.SfSpreadsheetHelper.WPFAlternatively, you can restore packages using:
dotnet restoreRun the project and test the feature directly from the WPF app:
dotnet runOr open the solution in Visual Studio and press F5 to build and run the application.