Sunday, February 6, 2011

Silverlight On Mobile : Copy and Paste functionality inside Windows Phone 7 Emulator

Already lot of discussions and forum threads heated up with the Copy and Paste support for Windows Phone 7 Actual Device. Few statements made the news all over the world like “Who needs Copy and Paste”,”iPhone took x amount of time and WP7 doing in y amount of time”,”we need it else what we will do on MS Office on WP7” etc and similar others.

You must have seen my last post titled as “White Elephant”,I am still suffering a lot and still my HTC HD7 is just another mobile phone since I still not have Marketplace here in India.My Live ID is also India based so doors are closed for me.Well, I am ready to wait and suffer from pain since this is not first time for me. Every other good things take hell lot of time to come to India.We say here that when Western world tag something as “outdated” we said its “new,hot and happening”.

Coming back to topic.Today after a long I got some free time to spend over my routine and finally I installed the

Windows Phone Developer Tools January 2011 Update (Download)

What it contains?

  • Windows Phone Emulator Update – Exposes copy/paste functionality in the Windows Phone 7 emulator
  • Windows Phone Developer Resources Update – Fixes a text selection bug in pivot and panorama controls.
  • Windows Phone Capability Detection Tool – Detects the phone capabilities used by your application.
  • Windows Phone Connect Tool – Allows you to connect your phone to a PC when Zune® software is not running and debug applications that use media APIs.
  • Updated Bing Maps Silverlight Control – Includes improvements to gesture performance when using Bing™ Maps Silverlight® Control.

What I am talking about now?

Windows Phone Emulator Update exposed copy/paste function inside our Windows Phone 7 Emulator.

Why I need that?

Currently,we do not have Copy Paste inside Emulator. Life becomes easy in Apps so as not to type same things multiple times. Copy/Paste is useful in such scenarios.Common examples can be while drafting SMS or working with MS Word on Mobile or typing Name,Address etc.

Ohh No! already submitted my App to Marketplace,what should I do now??

Answer from Release Notes :

Most applications already published to the Windows Phone Marketplace do not need to be recompiled to take advantage of copy and paste functionality. Copy and paste will work automatically for end users after they receive the corresponding update to the operating system.

Word of Caution ! (via Release Notes)

In applications that have pivot or panorama controls that contain text boxes, users can unintentionally change panes when trying to copy text. To prevent this problem, open your application, recompile it, and then resubmit it to the Windows Phone Marketplace.

Here are few bytes of Snaps how it will look like :

CopyWP7PasteWP7

There is no great code for this ! It’s a built in functionality. To demonstrate more clearly, I have today uploaded on small video (I took video by our own Microsoft product – Expression Screen Capture utility),Check this Video you will get more idea about Copy/Paste functionality inside Emulator.

Copy/Paste functionality on Windows Phone 7 Emulator

So, As per Release Notes,It suppose to work on :

  • System.Windows.Controls.TextBox

  • System.Windows.Controls.PasswordBox

  • Text input fields within the Microsoft.Phone.Controls.WebBrowser control.

You may have question about API or something like,Can we restrict User to use from Copy/Paste?, Well for all these types of questions,I am giving you to take control and explore ahead.

I hope this quick and small post will be helpful for you and turn out to be informative.Stay tuned ! much more on Windows Phone 7 and Silverlight is coming on your way.

Vikram.

No comments: