Tim Murphy's .NET Software Architecture Blog

Windows Phone 7

Passing Certification For Enterprise Windows Phone 7.5 Apps

Your Enterprise Windows Phone 7.5 application has different requirements and restrictions than the majority of apps in the store. While we now have Windows Phone 8 with different distribution methods, your client may still have 7.X devices that require using targeted distribution via the store. You need to consider how to allow the certification team to test your app without exposing sensitive data or affecting production systems. There are a few choices you have: Supply the testing team with test ......

Key Windows Phone Development Concepts

As I am doing more development in and out of the enterprise arena for Windows Phone I decide I would study for the 70-599 test. I generally take certification tests as a way to force me to dig deeper into a technology. Between the development and studying I decided it would be good to put a post together of key development features in Windows Phone 7 environment. Contrary to popular belief the launch of Windows Phone 8 will not obsolete Windows Phone 7 development. With the launch of 7.8 coming shortly ......

Sept. Chicago IT Architects Group Recap

Thank you to everyone who came out for last night’s presentation. Hopefully we will have a little better turnout next month when we are back on our regular night. I will post out the topic and the registration as soon as we get confirmation. For those interested in last night’s presentation you can find the slides here. I am also planning on making a white paper post here with the full presentation content. See you next month. del.icio.us Tags: Chicago Information Technology Architects Group,Smartphones,Enterpris... ......

Local LINQtoSQL Database For Your Windows Phone 7 Application

There aren’t many applications that are of value without having some for of data store. In Windows Phone development we have a few options. You can store text directly to isolated storage. You can also use a number of third party libraries to create or mimic databases in isolated storage. With Mango we gained the ability to have a native .NET database approach which uses LINQ to SQL. In this article I will try to bring together the components needed to implement this last type of data store and fill ......

My Favorite Free Windows Phone Twitter App

Windows Phone 7 has been out for about two years now. In that time I have switched back and forth with different free Twitter apps. Mostly the has been because someone has mentioned one or another that they like. I figured I would give a quick run down of what I felt were the pros and cons of each. These are only the ones that I have used and your mileage may vary. So here we go. WP7 Built-In Twitter Functionality While it is great that Microsoft put this functionality in, it is extremely limited ......

Using BingMapsDirectionsTask In Windows Phone 7

Windows Phone has a number of great capabilities built into it for developers. The Bing APIs allows you to easily give your application mapping functionality. You may just want to give users directions to a fixed location. What happens though when you want to give a user directions from their current location to an address that they are picking from application data? This article will cover just that scenario. Since almost everything in Windows Phone development is asynchronous this can get a little ......

Reading QR Codes In Your Windows Phone App

I have recently been working on an application for a client that needs to read QR codes. This has lead to some interesting findings. There are a couple of approaches you can use. One is to take a picture and evaluate it for a code and the other is more like the Bing Vision feature. Both of them can be accomplished by leveraging theSilverlight ZXing library from Codeplex. In order to have QR code images to test I would suggest going to QRStuff.com. It is a site where you can freely generate QR images ......

Features I’d Like To See In Windows Phone 8

With Windows Phone 8 around the corner I figured I would get the wish list out. I am encouraged by what we have seen so far. This is a short list of the things that have bugged me over the last two years of using and developing for the platform. I realize that some of them are pure fantasy and will never happen, but we can dream. So here we go. Separate volume controls for phone and alerts Videos can be taken in portrait and will be saved that way Tweets created in the People Hub should be able to ......

Creating Corporate Windows Phone Applications

Most developers write Windows Phone applications for their own gratification and their own wallets. While most of the time I would put myself in the same camp, I am also a consultant. This means that I have corporate clients who want corporate solutions. I recently got a request for a system rebuild that includes a Windows Phone component. This brought up the questions of what are the important aspects to consider when building for this situation. Let’s break it down in to the points that are important ......

TechEd 2012: A Little Cloud And Too Little Windows Phone

It is Monday afternoon and the last couple of sessions have been disappointing. I started out in the Nokia: Learning to Tile session. I guess I should have read the summary more closely because it turned out to be more of a Nokia/WP7 history and sales pitch. “I’m outa here!” I made a quick venue change and now we are learning about Private Cloud Architecture. The topic and the material were very informative. The speaker even had a couple of quotable statements. The first quote was “You can trust ......

TechEd 2012: Dude Where’s My Azure

It has been a fun first morning at TechEd North America. They keynote was both informative and entertaining. Some of the high points included a walk through of Windows Server 2012 and its new Hyper-V capabilities and use of ODX (offloaded data transfer). Between seeing stats like being able to being able run a Hyper-V VM with 1TB of memory and watching ODX move a 10GB file at a rate of 1GB per second was really impressive. The fun started when Scott Guthrie was doing his keynote demo and popped up ......

Windows Phone 8 Announcement

As if the Surface announcement on Monday wasn’t exciting enough, today Microsoft announce that Windows Phone 8 will be coming this fall. That itself is great news, but the features coming were like confetti flying in all different directions. Given this speed I couldn’t capture every feature they covered. A summary of what I did capture is listed below starting with their eight main features. Common Core The first thing that they covered is that Windows Phone 8 will share a core OS with Windows 8. ......

TechEd 2012: Windows Phone Exam Cram

Usually speakers take offence if you wear headphones in their talk. For the exam cram session it was a requirement. This was because it was a cubical walled room with an open top next to a study hall. While no-one was going to come out of this session ready to take a test, I am glad that I took the time to attend it. There was a fair amount of material that you should know already if you have ever taken a certification test before. This was packed around a mix of key concepts and some tidbits that ......

Document Your APIs

I have been working on a Windows Phone application for the user group that I help to run and have been experiencing head ache after head ache. The problem isn’t the Windows Phone development itself. The issues are with the external web service APIs that I am trying to use for sites like SlideShare and Box.net. The main issue is that while there is a lot of documentation and examples for the output of the APIs, the input format is sketchy at best. The web service for SlideShare, for example, requires ......

PSC Group Releases Project Risk Profiler Windows Phone Application

PSC Group is proud to announce that the Windows Phone version of its Project Risk Profiler application is now available in the Marketplace. This application allows project managers and stakeholders to evaluate the high level risks and benefits associated with proposed project before committing to it. The application is based on a methodology used by PSC when initiating projects and is a port of the iPhone version of the application. Each negative and positive attribute of a project is given a raking ......

Twitter Search JSON Deserialization

In a previous post I talked about using the JSON to LINQ features of JSON.NET. Thanks to Bil Simser I was able to do some testing of the deserialization capabilities of this library. The key was his hint to leverage the json2csharp web site. Below is the C# representation of the search results for a Twitter query created by putting an example of the search result into this site. public class Url{ public string url { get; set; } public string expanded_url { get; set; } public string display_url { ......

New WP7 App: Little League Coach

My first Windows Phone app, Little League Coach, has just been released into the marketplace. If you have ever helped coach a team where every player bats every inning this app should help keep your sanity. It is a simple application to allow little league coaches to manage the lineup for a game as well as keep track of batter rotation. As a bonus it tracks pitches and outs during an inning. Here are a few screen shots from the application. del.icio.us Tags: Windows Phone 7,WP7,Windows Phone Marketplace ......

Chicago Windows Phone Accelerator Lab Recap

This week I spent three day with close to 30 of my new best friends doing lots of Windows Phone coding and helping each other with our application. The sessions were lead by Jeff Blankenburg and Dave Bost who and kept the atmosphere light. This included us finding out a lot about Dave’s tastes in music. While most of the time was spent working on our individual apps we saw how an app is submitted to the market place and what you can prep your app for the market place using the Marketplace Test Kit. ......

Ways To Pass Time On Window Phone – TouchDevelop

A co-worker was showing me an in phone scripting environment on the iPhone and I knew I had seen one mentioned for the Windows Phone before. TouchDevelop is an app from Microsoft Research that allows you to create small applications that do a wide variety of operations including using most of the capabilities of the device. So could this be a fun way for us geeks to waste some time while waiting for our oil to be change or a table to open up at your favorite restaurant? So what does this language ......

Using JSON.NET To Load Twitter Search Results In WP7

The main way that Twitter provides feeds is through JSON. Unfortunately the version of the .NET Framework that is on the phone does not include the System.Runtime.Serializatio... namespace. Rather than trying to brute force the JSON feed I have been looking into using the Newtonsoft JSON.NET library. The first thing that I ran into with JSON.NET is that the documentation is severely tilted to the serialization side with almost no mention of deserialization. This would have been my preferred approach ......

New Windows Phone 7 Stencil For Cacoo

I have created a stencil for wire framing Windows Phone 7 application in Cacoo. This is definitely a work in progress, but until it is complete I would suggest combining this stencil with the Android stencil that is available by default in Cacoo. Below are a couple of screen shots of the stencil so far. First here is what the stencil window looks like currently. Taking a closer look the main device frame is illustrated below Lastly is the button pallet which contains the icons from the Windows Phone ......

Wire Framing WP7 Apps With Cacoo

While looking for a free alternative to Sketchflow I landed on the Cacoo web site. Any developer who decides to use the free Visual Studio tools may find themselves doing the same search. The base functionality of Cacoo is free although there are certain features that have fees attached to them such as extended stencils and templates. Cacoo doesn’t seem to have a template for WP7. It does have templates for iOS and Android development so I started with the Android template and started modidfying ......

Styling Windows Phone Silverlight Applications

If you have not developed with styles in Silverlight/XAML then it can be challenging and resources can be sparse depending on how deep you get. One thing that you need to understand is what level you can apply styles and how much they can cascade. What I am finding is that this doesn’t go to the level that we are used to in HTML and CSS. While styles can be defined at a page level if you want to share styles throughout your application they should be defined in the App.xaml file. This is of course ......

Why Windows Phone Rocks

First let me say that this is a “what I like” post and not a comparison of platforms. The Windows Phone is the first smart phone that I have owned (no, I’m not 100 or 15 years old). Now that I have done the full disclosure I did want to talk about the features of the Windows Phone that I really enjoy. I have had the Samsung Focus since shortly after it came out. I have found it extremely capable and enjoy the performance of the device. It is light, durable and bright. My wife has the LG Quantum that ......

Windows Phone Silverlight Poor Man's Double-Tap

I have seen a lot of articles about gestures but they require third party libraries or complex coding approaches. What I am going to present here isn’t strictly elegant or necessarily the best approach, but this is the way we would catch this type of event when we were still dealing with message loops. For the app that I have been working on I need to take action on the double-tap of a list item. The first question you have to ask your self is what a double-tap really is. It is in simplest terms ......

Upgrading Windows Phone Projects To SDK 7.1

Even though this is one of the simplest tips it is one of the hardest to find someone who has documented it. So instead of just telling you I am going to take a quick sidebar first. I wouldn’t want you to feel you got jipped by stopping here. One thing that happened when I finished running the Mango update on my Samsung Focus was that the apps that I was testing forced me to uninstall them. Now it turns out that this wasn’t that the SDK needed to be upgraded, but that the device had to be reregistered. ......

Laying Out Windows Phone 7 ListBoxes

A listbox can be a very boring display surface, but it doesn’t have to be. Ok, so it may never be exciting. At least we can create a more flexible output. The first element you need to learn about his the ItemTemplate which is in turn composed of a DataTemplate. As this combo implies it is bound to each item/data row. We will start organizing your base layout with a Grid control. Within the Grid you can add a RowDefintions group. A RowDefinition helps when you want components to be stacked for a ......

Creating Emails For Windows Phone 7

There are many reasons that you may want to add email capability to your Windows Phone 7 application. There are a number of ways you can communicate information out from an application. The mechanism for sending email from your WP7 application is the EmailComposeTask API. The difference between this API and the one that you would use for an ASP.NET application is that it opens a screen to allow the user to select an account to use and then creates a message which the user then has to send. This makes ......

The Power Of Windows Phone 7 Tasks

One of the things that is important to learn when you are developing any application is how it will interact with the environment it lives in. I’m not talking about simply interacting with files or database but with major resources. With WP7 there are a number of things such as the photos, browser, maps and the phone itself that your application may be concerned with. The WP7 development API includes a number of access points to give your application greater reach. These APIs can be found here. They ......

Windows Phone 7 TextBox InputScope

I originally started looking for how to make a TextBox have autocomplete capability. Strangely all the articles said that it couldn’t be done. The last thing you want is for your applications to make your users struggle entering information when every other application gives them a quicker entry method. So what is the solution? The TextBox tag has an InputScope property which if you set it to Text it builds a dictionary list as the user types. For the other InputScope types it mainly changes the ......

Handling Windows Phone 7 Back Button

When you have an application that navigates to more than one level of pages you find situations where you don’t want to go back to the previous page. Originally I was thinking that the answer was to capture the OnBackButton event and force the navigation back to the main page, but through several posts I found that this would not pass certification. Here is a link that really helped to figure out a more appropriate solution. To be a little more complete here is example code that you can use use for ......

Practical Window Phone 7 ListBox Usage

Almost every example of a Silverlight ListBox that I have found merely shows how to get data bound to it, not what to do once you get it there. What good is a ListBox that you can’t get a reference back from? The quickest practical way is to hold your original datasource and use the index of the selected item as you key back into your data. It isn’t pretty and you wouldn’t want to take this approach with large amounts of data, but then again a mobile device isn’t meant to display large amounts of ......

Windows Phone 7 Key Silverlight Page Events

Often times you want to you need to update a page when you enter it or save information automatically when you leave it. When you look through the events list on the property page you won’t find an event that occurs at those points in the page lifecycle. Intellisense is your friend in this case. The events OnNavigateTo and OnNavigateFrom can be overridden to give your application the required functionality. Below is a sample signature for OnNavigateTo. protected override void OnNavigatedTo(System.Window... ......

More Windows Phone 7 Panorama Notes

The saga goes on. There is always something more to learn. While I thought that ManipulationCompleted would do the trick from me it turned out it won’t. It turns out that if you want to figure out what PanoramaItem you are on when the user navigates between PanoramaItems the SelectionChanged event in conjunction with the SelectedItem on the Panorama works pretty well. private void Panorama_SelectionChanged(o... sender, SelectionChangedEventArgs e){ PanoramaItem item = (PanoramaItem)Panorama.Sele... ......

Windows Phone 7 Panorama Page

Creating a WP7 application with a Panorama page is fairly simple. Teaching it to do tricks is another thing altogether. As with most development controls the key is to learn the event model along with the object model. Knowing what manipulation means, when it happens and what the different levels it occurs at can be a great benefit. This was the case when I wanted to make sure that a particular item was updated before the user got to a particular PanoramaItem. The visibility of a PanoramaItem does ......

Beginning Windows Phone 7 Development

Windows Phone 7 development is an exciting topic. I have been exploring WP7 development for a little while now and I figured I would post some of the basic concepts that might be helpful to beginners. So here they are in no particular order. Panorama control I kept seeing references to the Panorama Control. It seems that this was a control that existed separately during the beta for WP7. In the final release this is now incorporated into a page type, so you won’t see the control in the toolbox. So ......

March 2011 Chicago IT Arch Group Recap

This month’s meeting was outstanding. We had a record turnout for John Sprunger’s presentation on mobile architectures. I guess that is what happens when you put up a presentation on the most popular topic in technology. I invite everyone to join us for next month’s event. And while I love to see new faces it is always great to have people come back and continue the conversation. Here are some resources from last night’s presentation. Presentation slides Whitepaper Case study Stay tuned for information ......

2011 Chicago Code Camp

It is that time again. Time to polish up you presentation skills on your favorite language or technology features. The Chicago Code Camp is accepting proposals for presentations. Show everyone in the Chicago area what you know and submit your own. I really enjoyed presenting last year and just had to submit a proposal for this year. This time around my topic is Increasing Collaboration with Windows Phone 7, SharePoint 2010 and Office Open XML. I had a much longer title but the site forced me to shorten ......

Memories Of The Past While Learning The Future

The last couple of weeks I have been working through some proof of concepts for Windows Phone 7. While working through one exercise I had a flashback. The book I was reading mentioned how you needed to code your application to have the smallest possible memory and and processing speed footprint. Suddenly I was back in high school with my Tandy hand-held computer which had a single line of text screen and a whopping 1K of memory. Talk about limitations. So what else can you learn from developing in ......