Posts

Showing posts from February, 2012

Nice panning and zooming in Windows Phone 7

A bit of time ago I published an app called Hidden Pics on the Microsoft Marketplace, on that entry I covered some basics on the Isolated Storage and the PhotoChooserTask for Windows Phone 7. On this entry I want to cover the zooming and panning. As part of that app, the user has the option to open a photo full size on the device screen and then pinch to zoom the photo.  They can also pan by dragging on the screen with the fingers. Now this is supposed to be very basic, but there is a catch, which is making the zoom stable. By stable I mean that if you use two fingers to zoom in the photo, once you finish the two fingers should have the same pixels behind them, which indicates that you zoomed proportionally and panned correctly. After googling around a bit I put together the code to do both zooming and panning properly. So here is the XAML for the control, I am using an Image control inside a Canvas with a CompositeTransform : The photo will start fully fitted on the Ima...

Hidden Pics: My first App on Windows Phone marketplace

Image
Just days ago I finished and published my first app to Microsoft Windows Phone Marketplace. As part of the "#30tolaunch" program, I must admit that waiting for  the app to be certified was a little scaring, but the app was approved without any trouble and is already up, you can grab it here . Now the idea of the app is simple, it uses the Isolated Storage to hide pictures you want to keep out of curious people looking at your phone. And it involves two common elements that might be useful for you in future apps. 1) Isolated Storage 2) Photo Chooser Task Isolated Storage. The Isolated Storage is a virtualized file system so your app can't really access the device storage like it used to be. If you are a Windows Mobile developer, you might remember those times where you could write/read files all across the filesystem of a windows device. Thankfully that's not like that anymore. And you get a isolated space just for you application. Reading bytes from a file ...