Making a cross platform “Have I Been Pwned” app using MvvmCross – Part 1

What will we be doing? In this multipart series we will be building an app that given an email address or username will search Have I Been Pwned and show the user if that particular email address or username has been compromised. The app will cover the major platforms, Android, iOS, Windows Phone and Windows…

How to find if all characters in a string are a number

Ever needed to find out whether all the characters in a string are numbers, so they can be converted to an int or validated for example? There are a couple of ways this can be achieved. Perhaps the most obvious way is something like this Or you can do it the way I prefer if…

Setting the active link in a Twitter Bootstrap Navbar in ASP.NET MVC

If you have used Twitter Bootstrap before you will probably know that it has a Navbar component so you can easily build navigation for a website. One of the features of the Navbar is being able to set which of the links within it is the currently active one, so this can displayed to the user. As…

XamDockManager – Setting keyboard focus back to the add row

For a project at work we needed the ability for the user to use the tab button on an Infragistics XamDataGrid to submit the record they are adding and set the focus back to the first cell of the data grid. For whatever reason this is not a built in method (have they not tried…

Entity Framework 4.3 – Adding Migrations from AppConfig in different project

When using the new Entity Framework migration features where your DbContext is not in the start up project for the solution you need to explicitly tell the Update-Database command which project to use to get the connection string information from. This can be done by passing a parameter to Update-Database called “StartupProjectName”, so the full command to…

XamComboEditor / ComboEditorTool Setting Default Text

Want to have default text shown when no item is selected in a combo box, such as “Please Select”? This can easily be achieved using a binding converter such as: Then in your XAML it can be used like this:

Empty WPF ListBox

I needed to show some text when a ListBox was empty, a quick Google turned up a StackOverflow question that was just the ticket!

Getting a .NET Color Name

I needed to find out the standard .NET colour name for for a Color object, assuming the Color object was a standard .NET colour! As there is no built in way of doing this I created a simple helper class, the code is below.

Using XamDockManager with Caliburn.Micro

I asked a question on StackOverflow about using the Infragistics XamDockManger with Caliburn.Micro, Marco Amendola came up with several ways to do it and I chose to implement my own docking manager. If you want to skip my ramblings you can find the code on bitbucket or as an attachment to this post. You will…

Debugging WPF Bindings

A very handy guide to debugging WPF bindings.