WPF Custom Commands explained

In this tutorial I will discuss WPF custom commands and how to pass parameters to it. The sample used will be simple to understand and relate to. I will not be going into the deep gory details. Just a gentle push which I am sure will be enough to set you off on the slippery slope which is WPF. How come things which are beautiful are also cruel. Anyways I digress.

As usual I will start off by WHY and then HOW. It will be mighty useful if you go through this post where I discussed how to use the built in WPF commands. And as noted in that post too, If you want to save time and your sanity, use FODY Commander instead.

Continue reading

Writing Data Driven Tests using xUnit

This is going to be a short tutorial (now updated for xUnit 2) on how to go about writing data driven tests using xUnit. The samples used will be easy to understand and relate to.

In case you are new to xUnit then all I will say is that xUnit is the next iteration for popular Nunit framework. It is better in many respects.

So what are data driven tests?

To keep it very simple, these are the tests which are run on different sets of data.

Continue reading

WPF MeasureOverride ArrangeOverride explained

This is a brief tutorial on WPF MeasureOverride ArrangeOverride functions. The details on these two are rather sketchy online and hence I decided to write this tutorial.

So what are these methods?
When do you need them?

As usual I will start with WHY first and then discuss the HOW.

Continue reading

Abstract Factory Pattern Explained

This is going to be a simple C++ based tutorial on Abstract Factory Pattern. The sample used easy to understand and relate to. This pattern is closely related to Factory Method Pattern. I have a small post dedicated to it. I will encourage you to read it first before taking up this one.

For a definition of Abstract Factory Pattern wikipedia is a nice starting point. And it has one messy UML diagram.

As usual I will start with WHY and then follow it up with HOW.

Continue reading

Mahapps controls customization

This is a brief tutorial on how to change the look and feel of Mahapps controls. I will be making a small change to Mahapps datagrid to demonstrate the steps.

Anyone who has been working with WPF for a reasonable amount of time must have come across Mahapps. In case you haven’t then you must check them out. They have done some awesome work. The world of WPF is a little less cruel thanks to them.

Continue reading