How to test copy-and-paste in the emulator for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Windows Phone Emulator supports copy and paste. You can use the emulator to test copy and paste functionality in your apps.

This topic contains the following sections.


To complete these procedures, you must have the Windows Phone SDK installed. For more information, see Get the SDK.

Testing copy and paste in your apps

This procedure assumes that you have a Windows Phone app that has a page on which you can add controls.

To add controls to your app

  • In Visual Studio, in the XAML file for your page, add the following code:

    <TextBox Height="72" Margin="12,70,0,0" Name="textBox1" Text="Hello World" VerticalAlignment="Top" />
    <TextBox Height="72" Margin="12,203,0,0" Name="textBox2" Text="" VerticalAlignment="Top" />

To run your app in the emulator

  1. In Visual Studio, on the standard toolbar, set the deployment target of the app to one of the emulator options.

  2. On the Debug menu, click Start Without Debugging.

    The emulator opens, and then the app starts.

To test the copy and paste functionality in your app

  1. On the screen of your app running in the emulator, click in the text box that contains Hello World.

    The on-screen keyboard appears.

  2. Use the mouse to click the word Hello.

    The word Hello is selected, and the copy icon appears.

  3. Click the copy icon.

    The paste icon appears at the top of the on-screen keyboard.

  4. Click outside the text box to close the on-screen keyboard.

  5. Click inside the empty second text box.

    The on-screen keyboard appears, with the paste icon at the top.

  6. Click the paste icon.

    The copied word Hello is pasted into the second text box.

See Also