Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3237636
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:45:42+00:00 2026-05-17T17:45:42+00:00

Can I Store more than 1 type in the Clipboard? Eg. like Text &

  • 0

Can I Store more than 1 type in the Clipboard? Eg. like Text & Image. say the user pastes in a text editor, he gets the text and if he pastes in something like photoshop, he gets the image. I thought it was possible but I tried

Clipboard.Clear();
Clipboard.SetText(img.DirectLink);

BitmapImage bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.UriSource = new Uri(img.DirectLink);
bitmapImage.EndInit();

Clipboard.SetImage(bitmapImage);

and I always get the image

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:45:43+00:00Added an answer on May 17, 2026 at 5:45 pm

    Yes, it is possible. The main problem is, methods you are using clear clipboard before putting data (that’s why in particular they named “Set…” instead of “Add…”).

    Clipboard.SetText (WinForms) / Clipboard.SetText (WPF) description from MSDN:

    (WinForms): Clears the Clipboard and then adds text data in the Text or UnicodeText format, depending on the operating system.

    But a solution is relatively easy:

    To place data on the Clipboard in multiple formats, use the DataObject class or an IDataObject implementation. Place data on the Clipboard in multiple formats to maximize the possibility that a target application, whose format requirements you might not know, can successfully retrieve the data.

    Check MSDN for details:

    • WinForms: http://msdn.microsoft.com/en-us/library/25w5tzxb.aspx

    • WPF: http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx


    UPDATE:

    Added links to WPF variants.

    To clarify @Björn comment:

    The MSDN page for System.Windows.Clipboard.SetText() does not state that the clipboard is cleared, even though that seems to be the case

    Both methods (WPF/WinForms) internally calls to OleSetClipboard so behaviour is similar (you can check http://referencesource.microsoft.com/#q=Clipboard.SetText).

    I also checked both variants (WinForms/WPF) in console app and found they do the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say we have a field that can be in more than one type,
As EF 4.0 released, more support to SQL server Stored procedure. Complex Type can
I have an application where users can store items. Now each type of account
Say that I've got a web application that can store Persons in a database.
Is it possible to get more decimal precision than the decimal type in C#?
It appears that NHibernate cannot automap more than one IList of a given type
I'm trying to figure out the best way to store large binary (more than
is it possible to store more than one value in database column. if yes
I can store Session State in InProc or State Server or Sql Server. If
how we can store the e mail id into a database? i mean which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.