Richard's Blog

  • XAML Spy is Firebug for XAML

    I have a love hate relationship with XAML. XAML gives you a lot of control over layout, but it's often hard to tell what's going on. When your layouts rely on data I found the design tools in Visual Studio lacking. I got into a very time consuming workflow of: build app and review interface, tweak XAML, rebuild app and review interface again.

    XAML Spy is a tool that has helped me a lot in the same way that Firebug changed the way I developed HTML, XAML Spy has made my XAML development workflow a lot smoother.

    XAML Spy works with WPF, Silverlight and WinRT, but I've only used while developing …

  • Where are my application files in Windows 8

    If you install a Windows 8 store app the files don't get put exactly where you expect them to be.

    App files

    \Program files\WindowsApps\[company].[application name]_[version]_[random letters]

    App storage

    [User directory]\AppData\Local\Packages\[company].[application name]_[random letters]

    App manifest

    \ProgramData\Microsoft\Windows\AppRepository\[company].[application name]_[version]_[random letters].xml

  • Living off the long tail

    A long tail

    What is the long tail

    In his original post and the following book The Long Tail Chris Anderson explains the modern economic phenomenon of the long tail. Selling goods through the web, particularly digital goods is offering the consumer an alternative to the hit driven culture of the past:

    Forget squeezing millions from a few megahits at the top of the charts. The future of entertainment is in the millions of niche markets at the shallow end of the bitstream.

    The basic premise is that in the past a shop could only carry so much stock. In a physical shop space is limited and also costs rent. …

  • Leeds Sharp

    Last night was the first Leeds# Microsoft Developer's User Group. Matt Ross and I have been wondering for a while why there were no .NET user groups near us and we decided to stop wondering and talking about it and just start one.

    The idea is that by joining forces with other local developers we can all become smarter and make some new friends. At our first meeting we had an interesting mix of people working on .NET projects involving a range of things from cows to parts for planes. We want to make sure that we respond to what the group wants and that's why we've set up a range of ways to …

  • Creating a snap view with XAML in Windows 8 (WinRT)

    If you create a new WinRT solution using the Grid or Split Application Template you'll get all the code you need to create a layout aware page that shows a different view when in snap view. If you start of your project using the blank project template, you need to do a little bit more work to get it working.

    First you need to change the page to be a layout aware page. LayoutAwarePage is a class provided by the template and is in the Common folder. (Update: In Visual Studio 2012 RC LayoutAwarePage is no longer in the common folder for a blank page project. You need to copy the file from the …

  • Creating app bar buttons in WinRT

    If you start a new blank Windows 8 App in Visual Studio you get loads of app bar button styles to choose from in StandardStyles.xaml including:

    SkipBackAppBarButtonStyle, SkipAheadAppBarButtonStyle, PlayAppBarButtonStyle, PauseAppBarButtonStyle, EditAppBarButtonStyle, SaveAppBarButtonStyle, DeleteAppBarButtonStyle, DiscardAppBarButtonStyle, RemoveAppBarButtonStyle, AddAppBarButtonStyle, NoAppBarButtonStyle, YesAppBarButtonStyle, MoreAppBarButtonStyle, RedoAppBarButtonStyle, UndoAppBarButtonStyle, HomeAppBarButtonStyle, OutAppBarButtonStyle, NextAppBarButtonStyle, PreviousAppBarButtonStyle, …

  • Drawing TEDx Bradford

    I went to TEDx Bradford on Friday. I kept visual notes of the talks using Paper for iPad. I got better at using Paper with practice so my notes start to look better in the later talks. I had to leave a little bit early, so I didn't get to make notes on all the talks.

    Tim O’Reilly

    Jane MacDonald, Tales of Things & Electronic Memory

    Mark Graham, Internet & information geographies

    Maureen Pennock, Archiving the Web

    Dominic Smith, Open source, Art & Wizardlyness

    Dr Kieran Fenby-Hulse, The Modern Mixtape

  • Launching Font Picker for mac

    Font Picker for Mac was waiting for approval in the Mac App Store when I agreed to talk at LSxCafe. Luckily it was approved the morning of the LSxCafe on Tuesday 6 March 2012, so it became my 'high profile' launch.

    Font picker is my first mac app and I'm really excited that it's now available for sale. I made the original version of Font Picker in 2008. It's popularity gradually grew and I started to get really nice feedback emails and ideas for new features. I really wanted to improve it and add those extra features, but I couldn't afford the time. The new Mac App Store (hopefully to be …

  • Top five ways to invest your spare freelance time

    Wish I had a time machine

    Since going freelance I started to view my time as an asset. When I’m working for a client I turn my time and skills into money and also a project that I’m proud of and can add to my CV. Between client projects I like to take some time out to work on a small project for myself. I see this time as an investment and it’s essential that I invest this time well if I want to continue doing well with my career.

    The problem is there are so many possible time investment opportunities that it’s hard to know what the wisest investment is. Here are five possible ways you can invest your spare freelance …

  • Using extension methods to filter IQueryable data collections

    As I talked about in my post Do we need the repository pattern? I’ve been thinking about how we can make a testable data access layer with Entity Framework without using a repository pattern. I showed how you could do that in my post Mocking your Entity Framework data context and testing it in .NET MVC. However losing the repository also loses a nice centralised place to keep your query logic. In this post I’ll show you a nice simple way to use extension methods to do this.

    Suppose you’re using Entity Framework to store a collection of foos and there are several places in your app that you …