Windows Phone recipes are open source (MSPL) projects aimed at helping Windows Phone developers with their Windows Phone applications. Recipes are usually common patterns for topics that require some attention. The idea is to provide a sample with some reusable code that can be reused later and modified to fit other similar scenarios. Developers are more than welcome to use them as is, or to change them as they see fit.
Dienstag, 14. Dezember 2010
Samstag, 11. Dezember 2010
If you want to implement a grid for your Windows Phone 7 app you have to use a Listbox control because of the missing DataGrid at the Windows Phone 7 platform. A first idea for contsructing a Grid then could be to use the WrapPanel control in your ItemTemplate of the Listbox control. But if you do this, the data virtualization of the ListBox will be disabled (Virtualizing Data in Windows Phone 7 Silverlight Applications - Peter Torr's Blog - Site Home - MSDN Blogs). This will increase the loading time of your ListBox and results in a very poor UX handling. The problem is, that you can not use any complex data structures in the ItemTemplate at a Listbox for Windows Phone 7. Every line in the Listbox should be one data line. So a solution for developing a grid styled Listbox is to implement a RowAdapter class for your bounded data.
Here a implementation of a RowAdapter, I used in one of my projects:
Freitag, 10. Dezember 2010
- Marketplace Reporting is available and first payements will start: Marketplace: Reporting ist da, erste Zahlungen im Januar - LIFE IN MOTION - Site Home - MSDN Blogs
- Activate more than three developer devices for a Marketplace account: WP7: Mehr als 3 Entwicklergeräte freischalten–wie? - LIFE IN MOTION - Site Home - MSDN Blogs
- How to detect if Zune is running during ChooserTasks: Kodierer [Coder]: Windows Phone Unplugged - How to Detect the Zune Software - Rene Schulte - Coding .Net and Silverlight with C#
- Some nice Windows Phone 7 tutorials: eugenedotnet blog | All about Windows Phone 7 and other Microsoft technologies.
- Windows Phone 7 and Cloud Connection: Windows Phone 7 Developer Guide
Freitag, 3. Dezember 2010
My personal traps of Windows Azure development for this week are:
- Problems with long project names (longer 248) for the temporary name of my delivery package for running at the Windows Azure emulator
- Use _CSRUN_STATE_DIRECTORY as environment variable to shorten the path
- Remove PlatformTarget from an existing Web project file to avoid compile error
- Strange CommunicationObjectFaultedException error if you use a Source Safe tool and your web.config is read only
- If you use assemblies that are not content of a normal Windows Server 2008 SP2 installation (for example RIA Services), you have to set the properties “Copy Local” to true of the assemblies involved – otherwise you get a never ending “busy” state of your web role at Windows Azure Management Tools
If your web.config is read only you get maybe the following strange error message in a Windows Azure project at runtime. It costs my half a day to find out, that this has nothing to do with my web service configuration or web service usage.
Mittwoch, 1. Dezember 2010
We have an existing web project (Silverlight 4, WCF RIA Services) that we wanted to bring to the cloud using Windows Azure. We added a new project, Windows Azure Cloud Service and added a new Web Role. After this you can connect your existing web project to this web role. The isolated web project compiles fine, but our new solution brings the following compile error:
“Error 1 The "CreateRiaClientFilesTask" task failed unexpectedly.System.Web.HttpException (0x80004005): Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.BadImageFormatException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.”
Strange, what happens and what can we do?
The solution is very easy, but hard to find out: You have to unload your .web project (which hosts the Silverlight application) and edit it the project file. If you now remove the tags
from the project file, your solution can be compiled !