Development Tip – Dispatching calls to the UI thread

In Silverlight and WPF, if you wanted to update the UI from a thread you had launched, it was important that the UI update be executed on the UI thread, lest you get an invalid-cross-thread-access error. You could ensure this by initially getting a pointer to the dispatcher for the UI thread, and then asking…

1

Development Tip – Tab Control

I’m trying to replicate a tab control in the Windows 8 //BUILD release. I’m not talking about your traditional tab control with grey tabs and a static appearance; rather something that we’ve seen throughout the demos at //BUILD; a set of clean links at the top of the app that flip to different sections of…

6

Development Tip – Packaging and loading files

In Windows 8 I want to have a file in my solution which is packaged as part of the application, then read at runtime. It’s not immediately obvious how to do this because the app is running in an environment we’re not used to, and using StorageFile.GetFileFromPathAsync doesn’t let you provide relative paths. So what…

0

Development Tip – ObservableCollection doesn’t work

NOTE: This post applied in an the early preview of Win8. It’s no longer applicable because the bug in question no longer exists; ObservableCollection works just great 🙂 Original article below.     Just getting started with Win8 development, and will note what I learn in a series of posts.   I’m finding that ObservableCollection…

7

A simple pattern for AJAX with MVC

This is mostly brainstorming; I’ve written some proof-of-concept (POC) code, and would love feedback. I expect to hear that this has already been done earlier/better/prettier. The requirements: A very common pattern for our intranet sites is a page with search controls, a submit button, and an output section listing the results. I want to give…

4

Windows Phone App 4: BabySoother

They say necessity is the mother of invention… A new baby plus a few weeks of paternity leave were the drivers in this case. The idea for this app started as a simple white-noise generator, and was basically a big “Play” button that played a recording of me saying “Shhhh”. Soon after I realized that…

0

The simplest way to do design-time ViewModels with MVVM and Blend.

  The problem is this: You’ve created your Views and ViewModels, but when you view them in Blend, you either see nothing, or the data you see is not useful for testing what you want in the view. There are various ways to deal with this, including writing code (either in the ViewModel or in…

4

Windows Phone App 3: Fact-Of-The-Day

No prizes for guessing what this application does, but I will reveal it just in case: When you start the application, it loads a bunch of trivia/facts from its own database as well as various RSS feeds, then shows them to you randomly. Here’s the marketplace link: http://social.zune.net/redirect?type=phoneApp&id=8a5fd405-f9de-df11-a844-00237de2db9e You just swipe the screen to reveal…

1

Windows Phone App 2: MobileMobile, a fun game for toddlers.

The second application I wrote for WP7 is a simple and fun game for tiny kids. The name – which I expect will confuse people – is a combination of “mobile” as in “This is running on a mobile phone”, and “mobile” as in “babies like to bash the animals hanging from this mobile”. Here’s…

0

Windows Phone App 1: Feedr, an RSS reader.

My favorite way to learn a platform/language/technique is to just dive in and experiment, so for Windows Phone 7 (WP7) I started writing some apps. The first one I wrote is “Feedr”, which is an RSS reader: Here’s the marketplace link (you need Zune installed): http://social.zune.net/redirect?type=phoneApp&id=7ee2f072-dbd5-df11-a844-00237de2db9e It’s pretty no-frills at the moment, but it does…

0