50 Apps By Christmas: Share to Clipboard

This article is part of the 50 Apps by Christmas series.

chart

When I’m using Windows 8, sometimes I wanted to copy something from one app and use it somewhere else. If the app allows selection and copy all is well, but a lot of apps don’t.

When an app does implement sharing I could share to another app such as Twitter, select all the text, right-click then copy to clipboard, which is tedious.

So I wrote Share to Clipboard.

It works as a share target so any app that allows sharing, you can get the content (bitmap, text, link) onto the clipboard with a couple of clicks.

screenshot

Things I Learned

Styling and Theming

I improved my approach to styling and theming. I already blogged about this.

Template

This is something that I keep putting off, but I really need to start to extract out common stuff into a new starter app, and also start to factor things into my own common (PCL?) libraries. Having a common lib will also make it easier to move forward into Windows 8.1

Deploy App Without Debugging

Because Share to Clipboard works only via the share charm, it was handy to be able to make a change and just deploy the app locally without having to run full debug. In Visual Studio you can do this easily by: Build Menu –> deploy; or hitting: Alt, B, P. This deploys the new version of your app without starting up debugging, etc.

Clipboard.Flush

If you’re putting stuff on the clipboard, calling Clipboard.Flush makes sure it’s there, e.g. :

var dataPackage = new DataPackage
                          {
                              RequestedOperation =
                                  DataPackageOperation
                                  .Copy
                          };

if (text != null)
{                
    dataPackage.SetText(text);
    Clipboard.SetContent(dataPackage);
    Clipboard.Flush();
}

Don’t Puts Ads on Share Target Charm

Initially I went with the ad-supported model by putting an ad in the share target UI that pops up when you share to it. This is a certification failure. You are not allowed to put ads on charms.

Because of this I moved to a time-limited free trial model. If people find it useful after the trial then they may choose to purchase the full version of Share to Clipboard.

Pingbacks and trackbacks (1)+

Add comment

Loading