October 2010 Blog Posts

Beware of .cache files on IsolatedStorage

Today I lost some time trying to figure out why my Windows Phone 7 application settings got lost as soon as the application was restarted. After several tests have concluded that the offending code was following one, which, at startup, deletes some “*.cache” files used by the application to store some temporary information. private void ClearCache(){ string[] cacheFiles = this.store.GetFileNames("*.cache"); foreach (string cacheFile in cacheFiles) { this.Delete(cacheFile); }} Everything looks ok, except that the application settings are stored in a file called “__ApplicationSettings.cache” and so they were...

posted @ Friday, October 15, 2010 8:41 AM | Feedback (1)

Playing multiple sounds in Windows Phone

Sometimes you might need to play multiple sounds at once (games are just one example) and as stated into documentation here: http://msdn.microsoft.com/en-us/library/ff426928(VS.96).aspx you can have only one MediaElement on a page, so: how do I play multiple sounds at the same time? If you can afford to use plain 16 bit mono wav files you can use XNA’s SoundEffect class in just a few steps: Add a project reference to Microsoft.Xna.Framework assembly. Add the wav files to your project using Content as default build action (don’t forget that Resource is a load time performance...

posted @ Sunday, October 3, 2010 7:05 PM | Feedback (3)

Oct 1st 2003-October 1st 2010: It’s MVP Time!

  This time announcement took longer than expected but I can finally shout: “YES, MVP Again!” (9th year in a row) will I reach the double figure? who knows… but for the moment let me enjoy the happiness of being part of this wonderful group. Congrats to those rewarded and welcome to new ones!   Technorati Tags: MVP

posted @ Friday, October 1, 2010 9:56 PM | Feedback (2)