Last week I had another incredible time at Microsoft’s annual Build conference. This year was particularly exciting for me, as I was invited to speak about some real-world experience on Building Apps for both Windows and Windows Phone. This talk is all about cutting to the chase: cross-platform development is challenging. It's also increasingly a reality we must accept, embrace, and learn to take advantage of. By demonstrating a "real-world" app designed for Windows and Windows Phone, you will learn six battle-tested techniques for maximizing both code and skill reuse between multiple platforms. Get the code If you enjoyed the talk and would like to check out the code for the Real-world Stocks apps that were built on stage, use the following Github link: https://github.com/matthidinger/Build2013RealWorldStocks Introspective This was my first talk at a major...

Xamarin is all the rage in mobile development right now. They just threw an amazing conference in Austin and started trending on Twitter during the opening keynote.
But I’ve identified myself as a Microsoft platform dev for years now, and Xamarin is all about iOS and Android. Why am I, and more importantly Microsoft, seemingly so interested in this product?
Xamarin
If you haven’t been following along, Xamarin is a company that is now 22 months old, founded by Miguel de Icaza and Nat Friedman. Their product allows you to develop native iOS and Android apps using the most wonderful language of all time: C#.
Their toolset, among other things, lets you use Visual Studio to build these apps, offering rich designer experiences, and even let you compile iOS apps using Windows thanks to some neat remoting technology.
Evolve Conference
Last week they threw their very first conference, and it was a truly impressive feat. A...

I recently had the opportunity to speak at Microsoft’s New Era of Work conference in Chicago. Below you’ll find the presentation material, the Real-World Stocks project which demonstrates the principles, and a high-level recap of the lessons learned while practicing the following techniques in actual apps. Slides A number of slides were provided by Microsoft, and many specifically from Matthias Shapiro. Be sure to check out his blog for more excellent Windows Phone articles! source For this talk I started with my Real-World...

On a recent project I needed to extract the windows phone user-agent string for our usage analytics, and it had to be the same user-agent as the IE requests. While this didn’t end up being as straight forward and I had hoped, the code below involves a few simple steps. First we have to insert a collapsed browser onto the page, then we can navigate it to specifically crafted HTML/JavaScript, which will in-turn notify the WebBrowser control of it’s user-agent. All you need to do is store it somewhere; in my case, I put it into a custom ApplicationSettings class, but you can store it anywhere you want. Usage Since this code requires adding a WebBrowser control to a page, it’s probably easier to do in code-behind as opposed to a view model. public partial class HomeView : PhoneApplicationPage
{
public HomeView()
...

I’m currently wrapping up a Windows Phone project and thought this would be a good time to share some of the more reusable stuff we needed. Zebra-striping alternate rows This particular app displays a lot of tabular data, so we wanted to zebra-stripe the rows to make them easier to discern. At first we tried using a ValueConverter to get the index of the current container, but this method didn’t end up working with the Telerik DataBoundListBox. Instead, we wrote a simple IndexingObservableCollection that will automatically populate the Index of each item as it’s added to the collection. This method also works with the infinite scrolling feature of Telerik’s listbox – which we actually needed anyway. IndexingObservableCollection To use it, you have to implement the IIndexable interface which ensure an Index property on your model. Then simply replace the ObservableCollection property on your view-model with the following IndexingObservableCollection.public class...

This blog is quiet… too quiet. It’s been a busy couple of months since starting at Clarity in January. PowerPoint, for better or worse, became my after-hours IDE. Below you will find some of the recent talks accompanied by their slides and code. Hopefully I didn’t forget anything, but please shoot me a comment if I did! WindyCityGo Apr 5 – 6, 2012 WindyCityGo is a two-day conference in Chicago that covers all things mobile. This year they added Windows Phone to their lineup and I was invited to speak on “Real World Windows Phone Development.” My talk covered an intro to metro and supports my tutorial series on building a polished Stocks app for windows phone. And now that my speaking gigs are winding down I can finally get back to that series! GET THE CODE ...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. View the Series Introduction and Outline Navigation Basics Even though this series assumes a basic understanding of Windows Phone development I want to briefly touch on the basics of page navigation. Windows Phone apps follow a basic stateless navigation paradigm very similar to that of a web app. Each page in the app is represented by a URL ending with .xaml. How to Navigate to a new Page (the bad way) ...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. View the Series Introduction and Outline Choices In the Microsoft world we have no shortage of client and server-side HTTP stacks to choose from. Rather than try to cover every possible combination, and to prevent this topic from getting too long-winded, I will keep this part succinct. Our first major decisions revolve around the following options: SOAP or REST? WCF or ASP.NET MVC? Without getting too deep into it,...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. View the Series Introduction and Outline The windows phone panorama Many apps lend themselves nicely to a Windows Phone Panorama. CTA Watch looks similar but it’s actually a Pivot with a background image. After going back and forth for a bit with Real-world Stocks I decided that the panorama looked pretty nice and went with it. Thanks again @Templarian for the background! Be sure to hit...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. View the Series Introduction and Outline Caliburn.Micro Many Windows Phone Applications use a lightweight MVVM framework for basic infrastructure services. Realworld Stocks is going to use Caliburn.Micro. I have had great success with Caliburn.Micro in my previous Windows Phone and Silverlight apps. CM was created by Rob Eisenberg and is under active development and has a great community and following. This article is going to walk through a lot of Caliburn.Micro setup, but...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. View the Series Introduction and Outline Before you begin, install NuGet! NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio. It can be installed directly from within Visual Studio and only takes a minute. In Visual Studio: Tools –> Extension Manager and find NuGet Defining our Solution Structure For our solution we are going...

Series Introduction and Outline This series is going to walk through building a polished, functioning Windows Phone app from start to finish. The app is called Realworld Stocks and the full source code will be available on CodePlex as the series progresses. I’ll be using Mercurial to encourage forking and maybe even pull requests from developers who want to contribute their own real-world solutions. Realworld Stocks The app we are creating is called Realworld Stocks, and this is what it looks like as of today. It’s not much yet, but hey, we’re only a few days in! Hopefully as the series progresses we’ll end up with a pretty nice looking stocks app ready for marketplace submission. Series Outline The following is a rough outline for how I expect this series to progress. Some parts will probably be...

Why? Because I should be able to Get Latest and F5! I think simplicity is a crucial measure of success in all software. I think being able to pull down the source code onto any developer machine and F5 is an important goal to strive for. Removing manual processes and streamlining the development workflow can yield huge productivity gains – especially when onboarding new developers. I believe databases should be provisioned and seeded automatically, all 3rd party libraries should be readily available in the repo, and any manual steps that must be memorized or documented should be avoided at all costs. But this hasn’t been easy on a Windows Phone device The aforementioned goals have been easily achievable in all of my projects except Windows Phone apps. A key component to this workflow is the magical variable known as localhost. When I F5 one...

This morning I received a Microsoft MVP award for Windows Phone Development. I’m really honored to be part of a community that really values knowledge sharing and continuous professional growth such as this. Over the past few years I’ve come to greatly respect and appreciate the vast amount of personal time that many people in the development community (both MVPs and non-MVPs) contribute to help drive our profession forward. I’d also like to offer a very special thanks to the entire Windows Phone Dev community for helping to expand this great platform into the consumer reach that it deserves. There is still a ways to go, but after the impressive world-wide launch of Mango across dozens of countries, carriers, and OEMs on a single day I think we can all agree that Microsoft is taking this seriously. I’m personally really excited to be in on the ground floor this...

TechWeek Chicago Starting today and running through next Friday, July 29th is TechWeek Chicago. TechWeek is a week of conference, expo and events with over 2,000 entrepreneurs, business leaders, and innovators, 4 days of conference sessions, over 150 international speakers, 4 days of an expo hall with over 100 exhibitors, 35 competing tech startups, and over 30 independent off-site events. TechWeek connects the newest web and mobile technologies to thousands of Chicago business, academic, community, art, and media professionals- all within one week. For more information about TechWeek, check out http://www.techweek.com. Windows Phone Unleashed During TechWeek Chicago, Microsoft is hosting Windows Phone Unleashed @ TechWeek. This will be an incredible evening getting hands-on with Windows Phone and you will have the opportunity to work with the Windows Phone and Windows Azure experts to help get your app ideas of the ground. More details for this event is...

A few weeks ago I was invited onto the Developer Smackdown podcast to muse about my adventures in Windows Phone development. That episode went live today, and can be found on iTunes/Zune under the series name “The Smackdown.” Of course it can also be streamed by any modern browser from the Developer Smackdown site. In this show, Mark and Clark sit down with Matt Hidinger and talk about building his app CTA Watch for Windows Phone 7. Matt discusses his experiences over this past year and shares a great deal of passion about the platform. i’m convinced, where can i get it? ...

I’ve just finished my new app called Transit Directions. As the name hopefully implies, the app helps people get around a city with public transit. It will provide step-by-step directions for 11 cities, with an interactive map to aid the experience. I spent a bunch of time polishing this app to replicate the native Bing Maps app experience, hopefully it paid off.
I assume this functionality will be built into the native app with the Mango phone update, so this baby has a limited shelf-life. B

update I’ve updated the code to check for the MapZoom event; also fixed a typo of MapClick to MouseClick. Original Post The Windows Phone Bing Maps control is very close to its desktop Silverlight counterpart, with few missing features. In fact none of the limitations have really impacted my phone projects, until today I ran into a peculiarly missing event: MouseClick. Without MapClick there is no built-in way (to my knowledge) to detect when the user taps on the map. The Map control unfortunately swallows all ManipulationCompleted events, and MouseLeftButtonUp/Down get fired even when the user pans or zooms the map, which we don’t want to concern ourselves with. Blend Triggers to the rescue The solution I came up with is a Trigger called MapTapTrigger. In meeting with a number of other WP7 developers over the past year I came...

I apologize this is a week late. Below is a zip which includes the slides and solution from my presentation on Caliburn.Micro. It should serve as a pretty good reference application for how to implement the most common functionality in Caliburn.Micro. I’ve also included a simple HTTP framework which can take advantage of Caliburn’s Coroutines to easily issue GET requests and parse the JSON response into a typed model. Download the Code! Technorati Tags: presentations,wp7,wp7dev,caliburn,mvvm

At PDC'10 last year Microsoft showed their upcoming solution for sharing assemblies between different platforms (Windows Phone, Silverlight, and .NET) – dubbed Portable Library Projects. The release date is said to be H1 2011 so hopefully they are still on track, maybe even to be included in VS 2010 SP1. Until then, we are on our own… Derick Bailey actually prompted this post from his tweet a little bit ago, so I figured I would share the solution I used for Bus Watch Chicago. step 1: define your entities/model in the client (WP7) project The domain for Bus Watch is public transit, so naturally some of my entities are Routes, Stops, Vehicles, Locations, etc. I define all of these classes in the WP7 project; the Route class can be seen below. The keen eye may have noticed that I defined Route as...

Portable Library Projects At MIX 10 Microsoft announced a rather modest code-sharing technique to allow Silverlight and .NET apps to share a small subset of System.* libraries. Well today at PDC Shawn Burke had a 60-minute session called “3-screen coding – Sharing code between Windows Phone, Silverlight, and .NET.” He unveiled a new Class Library project type called a “Portable Library” which can be directly referenced by any type of project. The obvious goal here is to share your core business logic between your various client-side applications. Thankfully Visual Studio will even trim IntelliSense within a Portable Library project to only APIs which have been specifically defined as portable between all application types. Release date for Portable Library projects is H1 2011 PDC Video: 3-Screen Coding Async Programming Improvements Probably the most popular announcement today was “The Future of C# and VB” talk,...

So it’s finally version 1 complete. This app has consumed a chunk of my free time over the past couple months while I got familiarized with the WP7 tools, but it’s been a great learning experience. This was pretty much my first time doing any real Silverlight or XAML-based development. Using Blend was an absolute treat so I hope to use this tool much more in my future. Lots of features will be added in the next few months, including some city expansion. I look forward to really exercising my abstractions to see if I can really plug in new Transit Services as easily as I think I’ll be able to.
...