Capture The Clipboard Events Of WPF Spreadsheet

Sample date Updated on Apr 02, 2026
clipboard spreadsheet wpf wpf-application wpf-spreadsheet

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.

Prerequisites

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

Technologies Used

  • WPF (Windows Presentation Foundation) + Syncfusion Spreadsheet

Getting Started

1. Clone the Repository

Clone this repository to your local machine:

git clone https://github.com/SyncfusionExamples/capture-spreadsheet-events-wpf
cd capture-spreadsheet-events-wpf

2. Install Dependencies

Install the required Syncfusion WPF Spreadsheet packages as dependencies:

dotnet add package Syncfusion.SfSpreadsheet.WPF
dotnet add package Syncfusion.SfSpreadsheetHelper.WPF

Alternatively, you can restore packages using:

dotnet restore

3. Run the Application

Run the project and test the feature directly from the WPF app:

dotnet run

Or open the solution in Visual Studio and press F5 to build and run the application.

Resources

Up arrow