ottobre 2010 Blog Posts
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...
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...
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