DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > How to Set Clipboard Text Programmatically in Windows Phone

How to Set Clipboard Text Programmatically in Windows Phone

Senthil Kumar user avatar by
Senthil Kumar
·
Jun. 15, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
5.83K Views

Join the DZone community and get the full member experience.

Join For Free

If you have to set the Clipboard text programmatically in your Windows Phone, you can use the Clipboard Class that is defined in the System.Windows Namespace.

Clipboard is a static class that exposes 3 properties

1. ContainsText

2. GetText

3. SetText

How to Set Clipboard text (Copy Paste) programmatically in Windows Phone?

You can use the Clipboard.SetText to set the text for the clipboar.

Clipboard.SetText("www.windowsphonerocks.com");

There is also a restriction to use the Clipboard.GetText which results in the SecurityException.

To test if the Clipboard has the value that you set, just paste the data to a textbox after using the Clipboard.SetText

Related Articles:

  • Loading the Image that is Set as Resource in Build Action
  • Telerik RadControls for Windows Phone – Article #8 – RadHubTile
  • How to display Suggestions in ‘on screen keyboard’ for a textbox in Windows Phone app?
  • How to write data to a file in Isolated Storage in Windows Phone ?
  • Retrieve the screen resolution of Windows Phone 7 using c#
  • Scheduling Notification in Windows Phone - Reminders
  • How to retreive the TimeZone programatically in Windows Phone ?
  • Tiles in Windows Phone Mango - Update an Application Tile using ShellTile APIs
  • You cant do this using PhoneCallTask in Windows Phone
  • Telerik RadControls for Windows Phone – Article #6 – RadAutoCompleteBox

 

Windows Phone

Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Image Classification Using SingleStore DB, Keras, and Tensorflow
  • Take Control of Your Application Security
  • Transactions vs. Analytics in Apache Kafka
  • Building a Login Screen With React and Bootstrap

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo