Cool little Done for you features in Windows 7 Phone App Development

by wenyuz 2. May 2011 11:45

In the past about a month, I have been working on a windows 7 phone application. And I found a couple of unexpected cool little done for you features built in to the windows 7 phone that made my life so much easier. First of all, I was trying to put in an animated splash screen at the application load, and I was really pleased to find that it is already automated, you just need to replace the SplashScreenImage.jpg in the project root folder, and wala the splashscreen is done. To change the default application icon, and the tile when you have the application pinned on the front page, all what you need to do is to replace the ApplicationIcon.png and the Background.png in the project folder. Of course, then you will have to create some cool images to get people’s attention… since I am a developer, not much of a designer, Thank God for my creative team with great and awesome talents to make my app look beautiful.

For most apps, you would need to use the ApplicationBar with ApplicationBarIconButton for settings, navigation and such. Coming from a .net, css background, I was expecting to animate it in Silverlight so it would have the press state and hover state. And surprisingly, I found out, you just need to create an image that is 48x48 with transparent background with white/color on the icon, and reference it in the ApplicationBarIconButton as iconUri. At runtime, the program would replace the white with black and also transparent with white when you press on the button, and also it has a nice round circle with it, so you don’t need to create an icon that has a round circle with two or three states. But in order for the image to show up in the emulator and on the phone, you need to go to the property for each image and then change the Build Action to Content and Copy to Output Directory to Copy Always. If not, it will always fall back to the default application icon. There are also some default icons that came with the SDK, so you don’t need to have them custom created, and you can find them at:

  • C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons\dark
  • C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons\dark

Once you find out what the file name of the icon that you want to use. They are mostly formated as appbar.xxx.rest.png, then in the IconUri, you can just simply reference them as IconUri="/Images/appbar.xxx.rest.png". then you don't even need to add them into your application's images folder for the icons to work.

 

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Tag cloud