Dallas, Development, Events, WP7

Windows Phone Accelerator Labs


Do you have the next million dollar idea that you just can’t find the time to finish? Do you already have an app for Android and iPhone that you want to expand into new markets?


Then I would like to encourage you to participate with a select group of developers for a Windows® Phone Accelerator Lab designed to help you accelerate your Windows Phone App into the Windows Phone Marketplace.

It’s time to turn your napkin sketches and leverage your hard work into real, sellable apps for Windows Phone in ONE WEEK! Join us for a special Windows Phone event you don’t want to miss – Windows Phone Accelerator!

In this week long developer retreat, we will have experts on hand to help you build, test, pitch, and deploy your app into the Windows Phone Marketplace. You will have your own workspace, hands on technical assistance, Marketplace subscriptions, and developer phones for testing.

The event is a no-fee event (plan your own travel expenses) and all developers are eligible, whether or not you have a mobile application built today. The only requirement is that you’re planning to develop a new application for Windows Phone.

This lab is for serious Windows Phone developers only – this is NOT your typical Microsoft training event. Seating is very limited and registration is not guaranteed. Priority registration will be based on several factors, including:

  • Apps that already exist, have been started, or a really strong idea
  • Participation in the event to write and prove out code using Windows Phone SDK
  • Application will be submitted into Marketplace place by May 31st.

Dallas, TX
Microsoft Technology Center

May 9 – 13, 2011

Register Now

Chicago, IL
Microsoft Technology Center

May 16 – 20, 2011

Register Now

Development, Events, MIX, WP7

The Mango Marketplace

Something that hasn’t gotten as much attention as I expected it would was a slide shown by Todd Brix from the Windows Phone Marketplace team about upcoming additions (read: Improvements) to the Windows Phone Marketplace distribution capabilities during the Mango timeframe. 

Here’s a screen cap of the slide from his talk at MIX11:


What Todd is showing us here is that when these changes are released, there will be essentially three distribution channels for Windows Phone applications:

  • Public Distribution Service – this is the existing marketplace you’ve all come to know and love. There are some great things coming in the Mango timeframe related to the discoverability of applications, the new Application Details page, and improved search relevance, but this will still be the primary distribution channel from whence most of us will get our software.
  • Beta Distribution Service – this is a new offering that allows developers to distribute pre-certified applications to an access-controlled set of beta users.  Right now, the team is thinking that limit will be capped at 100 users and limit the evaluation period to 90 days.  The goal, of course, is to enable users to effectively test these application and provide any important feedback. 
  • Private Distribution Service – this is another new offering that will allow developers to distribute certified applications privately to a targeted set of users. There is no scheduled time expiration or limit to the number of users; the developer controls access to the software by sending out download links.

The last 2, of course, are the most interesting ones.  Firstly, they both share one important distinction that differentiates them from the public distribution service option:  the applications in the Beta/Private channels are NOT discoverable via search.  Instead, developers will send a “deeplink” to the users with whom they wish to share the application.

For those who are unfamiliar, Here’s an example of a deeplink:


Clicking on this link from your desktop computer or laptop will launch the Zune client and take you to the details page for the application (in my case, the Random Number Generator application).  If you click this link from an email or the browser on your Windows Phone device, it will take you straight to the Windows Phone Marketplace Details page for that application and allow you to install it straight away.

Second, although the beta distribution channel is access controlled by a finite set of Windows Live IDs (up to 100), the "private" channel provides only link obscurity to keep prying hands off your application.  From what I can tell, anyone who gets their hands on the deeplink for an app hosted through the private distribution channel can download and install the application without restriction. 

This NOT the Enterprise Marketplace that many enterprise developers have been asking for, but it is a giant leap in the right direction, allowing for some finer-grained control over who gets access to your applications and for potentially how long.

For more information about these announcements, please watch Todd’s session at MIX11 (Making Money with your Application on Windows Phone) or you can watch it right here with my nifty HTML5 (or Silverlght) video player, courtesy of the wonderful folks at Channel9:

Development, Featured, WP7

Win a free Windows Phone!


Do you want to win a brand new Samsung Focus running Windows Phone 7?

Do you like building applications?

If so, this contest is for you!

Between now and June 30, 2011, when you develop and submit a Windows Phone 7 app into the Windows Phone Marketplace, you can be eligible for a chance to win a Windows Phone 7 (approximate retail value: $500 U.S.).

Every valid Windows Phone 7 app you submit will earn you one entry into the Sweepstakes drawing, so the more you develop, the more chances you have to win.

Here’s how it works

  1. Be sure you have an active Windows Phone Marketplace account
  2. Develop an application designed for the Windows Phone 7 platform
  3. Upload and publish your app to the Windows Phone Marketplace
  4. Fill out the form

That’s all there is to it!  Visit http://www.windowsphone7event.com for more information about the contest,including the complete contest rules.

Build your new Windows Phone application and enter today!

Azure, Cloud, Development, Product Announcements, WP7

WP7 Toolkit for Windows Azure now available

This toolkit is designed to make it easier for phone developers to leverage cloud services running in Windows Azure.  The toolkit includes Visual Studio project templates for Windows Phone 7 and Windows Azure, class libraries optimized for use on the phone, sample applications, and documentation.

Get the bits on CodePlex here: http://watoolkitwp7.codeplex.com/

The toolkit contains the following resources:

  • Binaries – These are the main bits you can add to your WP7 project that make it easy to work with Windows Azure (e.g. a full storage client library for blobs and tables).
  • Docs – Documentation is also provided that covers setup and configuration, a review of the toolkit content, getting started, and some troubleshooting tips.
  • Dependency Checker – This really cool (and handy) dependency checker ensures that you have all the bits required in order to successfully install and use the toolkit.
  • Project Templates – The toolkit also provides project templates that make it easy for you to build brand new applications.
  • Samples – We have a sample application that fully leverages the toolkit, both available in C# and VB.NET.  The sample application is also built into one of the two project templates created by the toolkit.

For more information & coverage, please take a look at these resources:

Product Announcements, WP7

Sprint releases Windows Phone 7 Device!

I just got an email from the Windows Phone 7 mailing list and saw that Sprint has announced the release of their WP7 device, the HTC Arrive on March 20th!

Looks like an awesome device!  Now all you folks on Sprint finally have access to the greatest Windows Phone operating system of all time! If you get one, let me know how you like it – HTC makes great phones, and I’m sure this one will be awesome too Smile

Development, Product Announcements, WP7

Windows Phone 7 Dev Tools – January Update

The Windows Phone Developer Tools January 2011 Update includes:

  • Windows Phone Emulator Update – Exposes copy/paste functionality in the Windows Phone 7 emulator. For more information, see How to: Test Copy and Paste in Windows Phone Emulator. End users can use the copy and paste functionality only after receiving the corresponding update to the Windows Phone 7 operating system.
  • Windows Phone Developer Resources Update – Fixes a text selection bug in pivot and panorama controls. In applications that have pivot or panorama controls that contain text boxes, users can unintentionally change panes when trying to copy text. To prevent this problem, open your application, recompile it, and then resubmit it to the Windows Phone Marketplace.
  • Windows Phone Capability Detection Tool – Detects the phone capabilities used by your application. When you submit your application to Windows Phone Marketplace , Microsoft performs a code analysis to detect the phone capabilities required by your application and then replaces the list of capabilities in the application manifest with the result of this detection process. This tool performs the same detection process and allows you to test your application using the same list of phone capabilities generated during the certification process. For more information, see How to: Use the Capability Detection Tool.
  • Windows Phone Connect Tool – Allows you to connect your phone to a PC when Zune® software is not running and debug applications that use media APIs. For more information, see How to: Use the Connect Tool.
  • Updated Bing Maps Silverlight Control – Includes improvements to gesture performance when using Bing™ Maps Silverlight® Control.

WPDT Fix includes:

  • Windows Phone Developer Tools Fix allowing deployment of XAP files over 64 MB in size to physical phone devices for testing and debugging.
Development, Events

Upcoming travel and talks

UPDATE 107692628(2011-01-27) – I knew I'd miss something!  Added UTD Presentation on 2/9
UPDATE (2011-02-08) – Added Connected Systems UG Meeting on 3/9

I’ve been asked for this a couple times, and finally have a few minutes to sit down and type it out.  Here’s a list of the things I’ve got coming up and the cities I’ll be visiting for them.  If you live in that city, perhaps we can organize some sort of meet-up while I’m visiting?

  • Feb 3-6 – Little Rock, AR @ UALR.  I’ll be visiting UALR on Thursday through Saturday doing a Windows Phone 7 Bootcamp-style event for the students in the MIS and CS programs there.  The agenda is pretty loose, but I should have some free time for meetups in the evenings on Thursday and Friday.
  • Feb 9 – Richardson, TX @ UTDDNUG. This is going to be a hands-on, all programming session for WP7 development in Silverlight. I've been wanting to visit UTD for a while now, and the scheduling just hasn't worked out yet.  This one is going to be great!
  • Feb 10 – Irving, TX @ DDNUG.  I’ve been asked to give one of two short talks for the evening.  My topic will be Windows Phone 7 performance, where I’ll cover some of the popular techniques for getting a bit better performance out of your Windows Phone 7 Silverlight application.
  • Feb 14-15 – Fort Smith, AR @ FSDNUG.  I’ll be presenting at the Fort Smith .NET User Group on Windows Phone 7 for Silverlight Developers. It’s a popular talk, chock full of stuff Silverlight developers need to know to make the transition to WP7. It presumes that you at least understand the basics of building applications in Silverlight, and adds to it the new stuff introduced by the phone. This one usually runs a bit long – I hope they’re OK with that Smile
  • Feb 15 – Fort Worth, TX @ FWDNUG.  I don’t get to attend these as often as I’d like, but I’m going to try to attend.  I’ll be coming off a trip to Fort Smith the same day, so I might not make it, but I am going to try.
  • Feb 16-17 – Dallas, TX @ Windows Azure Bootcamp.  Although I’m not presenting here, I plan to be on-site and available to help with the Bootcamp. This should be full of hands-on goodness as well as some time for instruction on how to deploy your web applications into Windows Azure, and how to take advantage of all the new NoSQL storage options with Windows Azure Table storage and Blob storage.
  • Feb 19 – Dallas, TX @ NTPCUG.  I’ll be doing a Windows Phone 7 for Everyone talk at the North Texas PC User Group. This talk focuses mostly on the User Experience of the phone as well as information about the Marketplace, with only a dabbling into Silverlight and XNA development. This is similar to the talk I gave at OpenCa.mp last year if you were in attendance.
  • Feb 22 – Irving, TX @ Windows 7 Bootcamp.  Like the Windows Azure Bootcamp, I won’t be presenting here, but I will be on-site to help my fellow DE Jennifer Marsman as much as I can.  She’s a big name in Women in Technology, the first non-Dallas adopter of the GiveCamp concept, and an all around excellent person!  I am totally happy to help her however I can.
  • Feb 22 – Irving, TX @ Dallas ASP.NET User Group.  Presenting on Windows Phone 7 development at the Dallas ASP.NET User Group. This one will be a mix of Silverlight + some of the performance stuff all rolled together. Should be a lot of fun.
  • Feb 26 – Mar 2 – Redmond, WA @ MVP Summit.  Originally I didn’t think I’d be able to go, but my manager found some funds from somewhere to be able to send me.  I’m looking forward to seeing all my MVP friends in one place again.  Now I just need to score a ticket to Ted’s party again this year Winking smile
  • March 4-5 – Dallas, TX @ Dallas Day of .NET.  Chander Dhall, leader of the UT Dallas .NET User Group and part of the DDNUG leadership crew is hosting his first ever DDoDN at UTD on March 4-5.  He’s managed to pull in some really great speakers from all over the world, including Oren Eini (a.k.a. Ayende Rahien) from Israel to conduct a day-long master class in .NET development, and Phil Haak from Microsoft to talk about MVC 3.  I’m working on putting together a day-long Windows Phone Developer Bootcamp to help people get up to speed on building WP7 applications in a hands-on format. This one should be epic.  
  • March 7 – Oklahoma City Developer's Group. I'll be presenting at the lunch session (and probably the evening session) on Windows PHone 7 development.  If I'm there in the evening, I'll probaby do my WP7 Performance talk instead of repeating the lunch-time talk.
  • March 8-9 – Fayetteville, AR @ NWADNUG.  The Northwest Arkansas .NET User Group are hosting a Windows Phone 7 party at their March user group meeting, so I volunteered to come out and help. It should be a lot of fun, plus prizes!
  • March 9 – Dallas, TX @ Connected Systems UG. I'll be speaking on WP7 as it relates to retrieving data over the network, WCF and OData.
  • March 12-15 – Austin, TX @ SxSW Interactive.  I won’t be there the whole week, but I am expecting to hear that either a Windows Phone 7 Bootcamp or a Mobile Development Smackdown will be held at SxSWi this year, and I’ll be on site to make sure that WP7 has a good showing.  My trip will probably be one overnight, I just don’t know which day that’s going to happen yet…
  • March 24-26 – Rogers, AR @ NWA TechFest.  This will be year 2 for the highly successful NWA TechFest.  I just learned the dates from event organizer David Walker yesterday, and immediately plopped them onto my calendar.  This is another one that I just can’t miss!  For this event, I plan on doing a longer version of my sill-in-development Performance Tips for WP7 talk.  There are a lot of great resources on the web about performance tuning your WP7 application, and I hope to cover the best of them in this talk.

Well, I think that’s it for now – I hope I didn’t miss anything.  See you on the road!


Development, Featured, MVVM, Silverlight, WP7

Gestures in Windows Phone 7

A friend contacted me yesterday asking me how to enable some sort of side-to-side scrolling of images, similar to the way to that the Pictures Viewer works. He looked at taking a ListBox, turning it on its side and just scrolling sideways, but it didn’t give him the “feel” that he wanted.  I thought it would be a fun diversion from the other stuff I was doing to use this request as an excuse to start looking at the gesture support in WP7.

As it turns out, doing this was very easy, and only required the addition of 2 libraries – both from the XNA Framework for WP7.  I’ll use this blog post to document how I did it, and hopefully come back later and add some snazzy transitions and other stuff in the future.  I used my Netflix Browser application as the inspiration for this application, so if you’re familiar with what I did there the data access portion will make total sense.  I also used MVVM Light, which is my current favorite MVVM framework, although using MVVM is not necessary for this type of demonstration.

In this application, I have one main page that displays the BoxArt from the currently selected movie. As you swipe left and right, the application swaps out the images, in order, to create a “previous/next” type of effect.  I haven’t added any animations or anything yet – hopefully that will come in a future version. The magic here is all in the ViewModel and the Silverlight Manipulation Events – so lets dive in and take a look…

The ViewModel

We start off by creating a simple view model with two properties:

  • Items – this is a collection of the movies that we’re tracking. In my code I limit this to 20 movies just so things don’t take too long to load.
  • CurrentItem – this is the currently selected item from the Items collection that the UX will data bind to. As necessary, this item switches its source from one movie to the next, with the expectation that the UX will automatically update to reflect the newly selected movie.

I’m also tracking an internal variable, SelectedIndex, that will help us keep track of where the CurrentItem is in the list of Items.  We use logic to constrain this index to the bounds of the Items list so we don’t get any out-of-range or out-of-bounds types of exceptions.

Since the ViewModel is responsible for loading up our data, we need to add that next.  I’ve shown the new OData library before – this time, we’re also responding to the LoadCompleted event on our DataServiceCollection<T> so that we can initialize the SelectedIndex property and the CurrentItem property to correspond with the first item in the list.

private void LoadRuntimeData()
    Uri serviceUri = new Uri("http://odata.netflix.com/catalog", UriKind.Absolute);
    NetflixCatalog catalog = new NetflixCatalog(serviceUri);

    Uri queryUri = new Uri("/Titles?$filter=Rating eq 'PG' and ReleaseYear eq 1988&$orderby=AverageRating desc&$top=20", UriKind.Relative);

    _items = new DataServiceCollection<Title>(catalog);
    _items.LoadCompleted += new EventHandler<LoadCompletedEventArgs>(_items_LoadCompleted);

private void _items_LoadCompleted(object sender, LoadCompletedEventArgs e)
    this.SelectedIndex = 0;
    this.CurrentItem = this.Items[this.SelectedIndex];

Once the data is loaded, the method that does the heavy lifting here is called ChangeSelectedIndex and takes an integer (+1 or –1) as a parameter.

internal void ChangeSelectedIndex(int modifier)
    // validate input
    var selectedIndex = this.SelectedIndex;
    if (selectedIndex + modifier < 0)
    if (selectedIndex + modifier >= this.Items.Count)

    // change the index and reset the current item
    this.SelectedIndex += modifier;
    this.CurrentItem = this.Items[this.SelectedIndex];

This parameter is used to track the direction of movement within the Items collection and ultimately determines which item needs to be displayed. We do some bounds checking to make sure that we’re staying within the range of the Items collection, but other than that we use it just to find the correct item and set it to the CurrentItem property.

How does this method get called?  We use the MVVM Light Messaging infrastructure to make that happen.  In the ViewModel constructor, I add one line of code to listen for the right message:

    this, (message) => ChangeSelectedIndex(message.Modifier));

At this point, everything is wired up and we're ready to move on to the UX

The User Experience

Once the ViewModel is created, we need to build the UX.  This time, instead of a ListBox to display all the downloaded movies, we’re using only an Image control that’s been configured to respond to user gestures. In Silverlight for WP7, we do that through 3 different event handlers:

  • ManipulationStarted – user is initiating a gesture (pan, flick, etc)
  • ManipulationDelta – user gesture is “in progress”
  • ManipulationCompleted – user has completed gesture (removed fingers, etc)

Each of them are valuable in their own right, but for our purposes, we only want to track the times that a user completes a gesture so that we can respond to it.  To make sure that I captured the gesture from anywhere on the page, I added an event handler to the PhoneApplicationPage object (the root of our XAML document). 

For the next part, Silverlight itself does not contain all the framework bits to do what we want it to.  For additional help, we’re going to bring in 2 of the XNA libraries.  For those of you playing along at home, you’ll need to add 2 references:

  • Microsoft.Xna.Framework
  • Microsoft.Xna.Framework.Input.Touch

These libraries serve to extend our gesture-handling capabilities allowing us to capture all the data related to these gestures and use them in our applications.  Without these references included, we’d get compile errors saying that certain types we were trying to access were not defined in the project, and suggest that we were missing some project references.

Now that the references are in place, we can finish configuring our gesture listener.  Inside the codebehind for the page, we do a little bit of testing to make sure we are tracking the right kind of gesture, and send the processing on to the Messaging infrastructure.

private void Image_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
    while (TouchPanel.IsGestureAvailable)
        // Read and respond to the current gesture
        GestureSample gesture = TouchPanel.ReadGesture();

        if (gesture.GestureType == GestureType.Flick)
            // determine direction
            var modifier = gesture.Delta.X > 0 ? -1 : 1;

            // send message to ViewModel
            Messenger.Default.Send<SelectionChangedMessage>(new SelectionChangedMessage(modifier));

In this code, we first check to make sure that we’re actually responding to a real gesture using the IsGestureAvailable property of the TouchPanel object (yep – this is one of those XNA objects I was telling you about).  To limit the scope of what gestures we want to work with, we can also add the following line to the constructor to tell the TouchPanel that we’re only interested in Flick gestures:

TouchPanel.EnabledGestures = GestureType.Flick;

Once we’ve determined that we’re working with a Flick gesture, we have to figure out whether the user was flicking to the left, intending to go to the next picture, or flicking to the right, intending to go back.  Luckily for us, that’s really easy to do with the GestureSample class’s Delta property.  The delta we want is along the X axis, tracking left to right or right to left movement.  If  the GestureSample.Delta.X value is positive, that means the user flicked from left to right, indicating that they wanted to move back in the picture stack. If the GestureSample.Delta.X value is negative, the user flicked from right to left and wants to go to the next picture (I know, this sounds upside down, but really – it does work).

When we have the direction the user wanted to go, we can set the index modifier to either +1 (next picture) or –1 (previous picture) and send it to the VM.  We do this through the Messaging infrastructure provided by MVVM.  I created a simple class called SelectionChangedMessage that has only one int property, Modifier, to express that value.  Once dumped into the message bus, the ViewModel will pick it up, run the code we wrote earlier, and switch out the current picture with the next one.  Magic!

At this point you might be saying to yourself "gosh Chris, I thought with MVVM we weren't supposed to have any code in our codebehind files?” To that I say "nay, nay". Code in the codebehind is perfectly acceptable so long as what you're doing relates to the UX itself. If you're manipulating business objects, or doing something related to business or data access logic, then you definitely need to work in the VM.


Adding gesture support to your WP7 application is really easy – it’s a bit trickier to make some nice looking transitions between elements, or within gestures. I hope to add to this post later with some tips on how you can do that. For now, you can download the code from this post using the link below.

Cloud, Dallas, Development, Events, Featured, Texas, Training, WP7

Dallas Day of .NET

I’m pleased to share with all of you an exciting announcement around a new (hopefully) annual technical event here in Dallas.  On March 4 & 5, 2011, Dallas will host the first ever Dallas Day of Dot Net!  DDDN is a 2-day conference featuring the top local technical talent as well as a special guest travelling all the way from Israel – that’s right Ayende Rahien (a.k.a. Oren Eini) will be featured in one of the three scheduled tracks.

For more details, you can visit the event website at http://jointechies.com and register today at http://jointechies.eventbrite.com/.  Registration will be capped at 300 so please register ASAP!

If you use the discount code “ChrisKoenig” before December 7, you’ll get $50 off the early bird entry fee!

All proceeds from the event will be donated to a local area cancer patient – see the http://jointechies.com website for more information.