using-wpf-clipboard

Solid

Uses WPF Clipboard for copy/paste operations with text, images, and custom data formats. Use when implementing copy/paste functionality or inter-application data transfer.

Data & Documents 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# WPF Clipboard Patterns Implementing copy/paste functionality using the Windows clipboard. **Advanced Patterns:** See [ADVANCED.md](ADVANCED.md) for clipboard monitoring and error handling. ## 1. Clipboard Overview ``` Clipboard Operations ├── Text Operations │ ├── SetText / GetText │ └── Unicode, RTF, HTML support ├── Image Operations │ ├── SetImage / GetImage │ └── BitmapSource support ├── File Operations │ ├── SetFileDropList / GetFileDropList │ └── File path collection └── Custom Data ├── SetData / GetData └── DataObject with multiple formats ``` --- ## 2. Text Operations ### 2.1 Basic Text Copy/Paste ```csharp using System.Windows; // Copy text to clipboard Clipboard.SetText("Hello, World!"); // Paste text from clipboard if (Clipboard.ContainsText()) { var text = Clipboard.GetText(); // Use text } ``` ### 2.2 Text Formats ```csharp // Set text with specific format Clipboard.SetText("Hello", TextDataFormat.UnicodeText); Clipboard.SetText("<b>Hello</b>", TextDataFormat.Html); Clipboard.SetText(@"{\rtf1 Hello}", TextDataFormat.Rtf); // Get text with specific format if (Clipboard.ContainsText(TextDataFormat.Html)) { var html = Clipboard.GetText(TextDataFormat.Html); } ``` **TextDataFormat Options:** | Value | Description | |-------|-------------| | **Text** | ANSI text | | **UnicodeText** | Unicode text (default) | | **Rtf** | Rich Text Format | | **Html** | HTML format | | **CommaSeparatedValue** | CSV format | --- ## 3. Imag...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category