Guidelines for clipboard commands

Applies to Windows and Windows Phone

Clipboard commands—copy, paste, and cut—provide users with a familiar way to transfer content from one location to another. With these commands you can help users transfer content:

  • Within the same app
  • Between Windows Store apps
  • Between desktop applications
  • Between Windows Store apps and desktop applications
Although Windows 8 and Windows 8.1 support other ways for apps to exchange information—such as through sharing content—copy and paste commands remain an expected part of the Windows experience. Your app should support them whenever possible.

Dos and don'ts

  • Support copy and paste for any editable content that a user can explicitly select—such as a subset of a document or an image.
  • Consider supporting copy and paste commands for content that users might want to use somewhere else. For example:
    • Images in a photo gallery application
    • Computation results in a calculator
    • Restaurant address in a restaurant-search application
  • Be aware of rights management and other factors that might restrict the use of copy and paste commands. For example, if your app supports viewing rights-managed mail, a policy might restrict the user from copying all or parts of such content.
  • Make sure it's clear what a user is copying, or where a user can paste content.
  • Provide support for paste only on editable regions and canvases in your application.
  • Consider implementing an undo command, as copy and paste can lead to content being deleted or replaced.
  • If a control already supports copy and paste, use the control's implementation. If you need to build your own implementation of copy and paste, make sure the experience you create is consistent with these controls.
  • Consider supporting sharing if you are also supporting copy.
  • Determine if users should access the copy and paste commands by using a context menu or the app bar. Use a context menu:
    • For items that users can select only through tap-and-hold gestures—such as hyperlinks or embedded images. For example, let's say your app displays an address to the user, and you want the user to be able to copy that address. A great user experience would be to create a Copy Address command that users can access when they either right-click or tap-and-hold the address. This command would then copy the address to the clipboard, from which the user can paste it into the app of their choice.

      Example of accessing copy command from context menu

    • For text selection (both editable and read-only).
    • For paste operations where the target is well defined, such as a cursor location or a table cell.

    Use the app bar if the preceding guidelines don't apply. Some examples include:

    • When your app supports the selection of multiple items.
    • When the user can select a portion of an image.
    • When the target of a paste command is clear—such as pasting a screen shot on a canvas.
  • We strongly encourage you to always support keyboard shortcuts for clipboard commands.
  • Don't provide support for copying content that can’t be selected—either explicitly, or through a context menu.
  • Don't provide support for copying text that is not part of the core content of your application. Titles, headers, and button text do not need to be copied.
  • Don't enable the paste command when the clipboard is empty or if it contains content that your app doesn't support.

Related topics

For designers
Guidelines for context menus
Guidelines for sharing content
For developers (HTML)
Popup menu
For developers (XAML)
Popup menu

 

 

Show:
© 2014 Microsoft