Published on Saturday, January 1, 2011 5:29:07 PM UTC in
Skit
Das ist es also, 2011. Als ich den Rolladen hochziehe, rumpelt eine kleine Dachlawine in die Tiefe. Fühlt sich irgendwie gar nicht anders an als 2010, denke ich, und erinnere mich an die rauschende Silversternacht.
Published on Thursday, December 30, 2010 12:11:00 AM UTC in
Programming
When I was looking into how I can easily draw 2D geometry in XNA on the Windows Phone 7, I came across a Microsoft sample named "Primitives" which provides a PrimitiveBatch class that can be used to draw points, lines and triangles on the screen. This was basically what I wanted, but when I wanted to use it, I instantly ran into an exception.
Published on Monday, December 27, 2010 7:48:00 AM UTC in
Programming
Today someone in the Silverlight Forums had the problem that the default style for the hyperlink button in Windows Phone 7 does not wrap the link text. Used to the hyperlink button of Silverlight 4, he tried something like this:
Published on Wednesday, December 22, 2010 3:44:00 PM UTC in
Programming
One of the Microsoft samples for XNA development contains a simple AudioManager class to play sounds and music which I wanted to base an own implementation for a project of mine on. One of the details I needed to change was that the sample code loads a fixed set of sounds hard-coded as strings. Looking for alternatives, I thought it would be nice to use XNA's XML content importer which is part of the standard content pipeline importers, so I could easily define the sounds to load and their properties in XML. Unfortunately, using it wasn't exactly straight-forward.
Published on Saturday, December 11, 2010 9:50:00 AM UTC in
Programming
Yesterday I wanted to create some animations for a Windows Phone 7 XNA project I'm working on, and I came across the problem that I wanted to put several frames of that animation on a single texture. This is a well-known technique in game programming to optimize performance compared to having single textures for each frame. Here is a cutout from the official Catapult Wars sample project to give you an idea. In the game, those frames are shown one after another at high speed, creating the illusion of an animated object. If you're familiar with game programming, this shouldn't be of any news to you.
Published on Wednesday, December 8, 2010 1:50:00 PM UTC in
Programming
Last time I've blogged about how I like the data contract serializer to persist data in tombstoning situations on the Windows Phone. Since then, I was contacted by a few developers who had problems with some of the implications that kind of serialization has. The reason for this partly is that designing your types for serialization is not as trivial as it seems at first, but also due to some very misleading information you'll run into when you receive errors during the process of serialization. So I decided to put together a list of requirements and pitfalls you have to take into consideration when you want to use the data contract serializer. I'll start with some rather trivial things and proceed to not so obvious details later on. Some of those issues also are contrary to good object-oriented practices. I'm trying to point them out so you can decide whether they're acceptable to you or not. Please note that a lot of the following is not specific to Windows Phone, but applies to Silverlight and .NET.
Published on Saturday, November 27, 2010 10:48:00 AM UTC in
Programming
Hopefully every Windows Phone 7 developer has heard about Tombstoning by now. To avoid writing the same code to persist and retrieve data again and again, there have been quite some efforts in the past to create generic methods of handling this process of application deactivation/termination by various people. James Ashley for example uses the ApplicationSettings and State classes for this (improved by rschiefer here). I personally like implementations that use the data contract serializer (here is an example by Joost van Schaik), because I can selectively choose what values should be serialized by applying the data member attribute only to those properties I want to be persisted.
Published on Monday, November 22, 2010 8:46:00 AM UTC in
Programming
& Tools
After having worked with the Windows Phone 7 emulator for a while, I finally received my real device today (a shiny Samsung Omnia 7). I first played with it for an hour or so and then wanted to unlock it immediately to give it a spin in Visual Studio. As it turns out, this is easy, but not as obvious as it should be, and I found it hard to find appropriate help when I searched the web, so I decided to give a quick summary here.
Published on Friday, November 5, 2010 7:31:00 AM UTC in
Programming
& Tools
This is a post about a particular behavior of the built-in ASP.NET development server that can turn your debugging experience as a Silverlight developer into an unpleasant experience.