Here it is, the third WP7 Developer Roundup which aggregates information of interest to Windows Phone 7 developers. I want to share every good article, link or video which I come across over the week. I was really busy this week so…

Loading quickly on Windows Phone 7 – Twitter example [eng] (identitymine)

Inside Windows Phone #11 Obfustication and Analytics [eng] (channel9)

How to move your line of business apps to phone + cloud [eng] (Bruce Kyle)

More under the hood, but hidden or locked [eng] (xda developers)

At the weekend I spend some time testing aroung with geolocation and coordinates wihtin Windows Phone 7 development  and wrote a Method,  which calculates the distance of two given geocoordinates (Point A –> LatitudeA | LongitudeA and Point B –> LatitudeB | LongitudeB ) in kilometer (km).

It works just fine and  I want to share the code with everyone, so here it is

Grab the code here –>

Maybe it`s helpful for one or the other.

Here it is, the second WP7 Developer Roundup which aggregates information of interest to Windows Phone 7 developers. I want to share every good article, link or video which I come across over the week…

Improving Windows Phone 7 Application Performance [eng] (David Anson)

Silverlight for Windows Phone Toolkit – Nov 2010 [eng] (CodePlex)

WP7 Serialization Comparison [eng] (Kevon Marshall)

How I made the ‘myChannel9′ wp7 app (source code included) – Part 1 [eng] (Sigurd Snorteland)

Sterling Isolated Storage Database with LINQ for Windows Phone 7 [eng] (CodePlex)

Windows Phone 7 Fundamentals [ger] (Sascha Wolter)

Silverlight Windowless-Mode?

3. November 2010

When you want to embed HTML or something like that in a IFrame wihtin a Silverlight application and you come across an error which says that you have to change the windowless parameter to true  and one don`t know where to do this. Just open up your …TestPage.aspx or …TestPage.html file, which hosts your Silverlight  application.

Scroll down until you find <div id=”silverlightControlHost”> and simply add the windowless parameter like so:

Est voila, that`s all one got to do…

If you`re using your WP7 within a WLAN like me ( is there anyone who doesn`t? 🙂 ) and think about security, you might want to add your WP7 to the MAC-Address filter in your router configuration. What first comes to mind is, where the heck am I able to find the MAC-Address of my Phone?? There is no info the phone settings or anywhere else.

So here`s the solution for that!

  • connect your phone to your WLAN
  • open up a browser and navigate to your routers configuration site (e.g.
  • search for a tab or menupoint called status or logs
  • click on “network clients” or similar

After this steps, you should see something like this

In the above screeshot you see my actual network clients connect to my WLAN. One is my laptop and the other one should be my Windows Phone 7. To check this, just open up the command prompt and use ipconfig /all to look up the MAC-Address of the machine. So you know that the other MAC-Address in the router config is the WP7!

Est voila 🙂 now you`re able to add your WP7 device to your MAC-Address filter.

This is the start of my (hopefully) weekly WP7 developer roudnup series which aggregates information of interest to Windows Phone 7 developers. I want to share every good article, link or video which I find helpful and/or worth reading…

I kick it off with a collection of great links for WP7 development, such as step-by-step or should I say day-by-day tutorials, tipps and tricks and helpful How-Tos!

31 days of Windows Phone 7[eng] (Jeff Blankenburg)
How to capture audio from your microphone in WP7[eng] (Derik Whittaker)
A Step-By-Step Guide To Building And Deploying A Windows Phone 7 Application To Marketplace[eng] (colonizer)
Windows Phone 7 – Das portable Tor zur Welt[ger] (Tom Wendel)
WP7 Development Tips[eng] (Kevin Marshall)
Windows Phone 7 PDC Sessions (Ken Jones)

Inspired by a question in the german Windows Phone 7 msdn forum about the possibility of using generic covariance interfaces in WP7 development, I`m writing this blogpost.

Generic covariance and also contravariance for interfaces and delegates were introduced as new features in C#4.0. Also two new modifiers for type parameters came along with it –> in and out, which indicate wether the interface or delegate is co- or contravariant.

Here`s a little code-snippet:


While this works fine on the desktop, I figured out that one isn`t able to use this feature for windows phone 7 development!

It`s because of the .NET Compact Framework CLR, which runs on a WP7 device. While you write Silverlight or XNA applications, it`s limited to the Compact Frameworks CLR, which doesn`t support the newest C#4.0 features such as generic co- and contravariance for interfaces.

But I come to the conclusion that the lack of this feature is no big deal! 🙂 Just wanted to share this experience…

As the title suggests, this blogpost is all about setting up Git on your Windows machine and connecting it to, a great open source Git repository hosting service with social components!

There are several steps one have to follow. I present you an logical order so the whole setting-up process should work fine!

  • Download msysgit from This is the “Git for Windows” package. On the left side of the msysgit-Page choose either the netinstall- or the fullinstall-package. Download msysgit and install it on your machine. If the installprocess was successful you will see a BASH window like this below


Within the shell you`re able to use all Git features just by hacking in the appropriate commands.

  • After successful installing Git for Windows, head over to, create an account, if you don`t have one already and create a repository, give it a name and follow the Github instructions.
  • At some point you have to enter a public key. You can generate you a key by using the ssh-keygen command within the bash. Just type ssh-keygen –t dsa for example. A dialog like the following appears

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/cordellcp3/.ssh/id_rsa): <enter>
Enter passphrase (empty for no passphrase): <enter>
Enter same passphrase again: <enter>
Your identification has been saved in /Users/cordellcp3/.ssh/id_rsa.
Your public key has been saved in /Users/cordellcp3/.ssh/
The key fingerprint is:

  • It automatically adds a new entry in your known_hosts file. Now switch to your .ssh/ folder and open your generated file and copy the complete line ssh-rsa AAAA… to the clipboard. After that head over to, click on “Account Settings”, choose SSH Public-Keys and past your copied content in, save it and your done!

I hope that this post is a help for someone, who wants to start using Git and Github Smiley

There are also PlugIns for Visual Studio (2008, 2010) like Git Extensions or Git Source Control Provider.

Intellisense Code Snippets

21. October 2010

Every now and then, when I`m programming at home I deeply miss some features which I`m used to at work! What comes first to my mind is R# ReSharper by JetBrains, but Id on`t have a license at home.
I often use the built-in code snippets for all kinds of tasks, which I miss at home, so today I played around with <strong>Intellisense Code Snippets</strong>! It`s really easy to write custom code snippets which faciliate your work.

So I wrote a snippet for generating public properties surrounded with regions. Here it is…

Sorry about the image. Got some issues with the code-snippet plugin in Live-Writer.

If you look at the code, it should be self explaining. Nothing too difficult there. All you have to do is to copy the *.snippet file to the appropiate folder, e.g. <em>\Program Files\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#\</em>

I named my snipped “biprop.snippet”, in the code editor within VS2010 you can now simply type biprop + TAB and the code is generated for you.

In software development, one is often tempted to have method-sginatures with ten or more paramters, which isn`t good at all and will make your method difficult to understand and maintain. Some programmers use global variables to avoid passing too many parameters around, but that`s bad design and very risky, if other parts of the program overrides the same variable! Please don`t do that, that`s really a NO-GO!!

Imagine that your code looks like this:

private Boolean InitializePreloader(Int32 id, String opCode, String logFile, String mbxPos, Int32 mbxType, String info, String foo, String bar, Byte sign)
	//do some work...
	return true;

All of these parameters relate to one purpose, to initialize an object, in this case a preloader! What you can do now is to write a class for example called PreloaderSettings.cs . In this class you define all the parameters of the InitializePreloader-Method as properties! For example:

public class PreloaderSettings
    public Int32 Id {get; set;}
    public String OpCode { get; set; }
    public String LogFile { get; set; }
    public String MbxPos { get; set; }
    public Int32 MbxType { get; set; }
    public String Info { get; set; }
    public String Foo { get; set; }
    public String Bar { get; set; }
    public Byte Sign { get; set; }

After that your new method signature could look like this!

private Boolean InitializePreloader(PreloaderSettings settings)
    //do some work...
    return true;

Doesn`t that makes your code a lot cleaner, easier to maintain and to understand?!