How to

get custom data from clipboard

Published: 26. September 2014 | Updated: 26. September 2014
License: Microsoft Public License (MS-PL)
Categories: Windows
Tags: C# Windows Winforms WPF
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at analyzant.com

WPF

using System.Windows;

string format = "text/css";
object obj = null;
if (Clipboard.ContainsData(format))
{
    obj = Clipboard.GetData(format);
}

WinForms

using System.Windows.Forms;

string format = "text/css";
object obj = null;
if (Clipboard.ContainsData(format))
{
    obj = Clipboard.GetData(format);
}
Send us feedback about this snippet »



Related Snippets: