Monday, 23 January 2012

C# - Dynamically skinning your WPF applications

Far from making suggestions about how to inflict great pain and suffering on your WPF applications, this should make your applications that little bit more interactive and customisable. The way we'll be doing this is by dynamically loading in resource dictionaries into the Application's merged dictionaries. Lost? Don't worry, I was at first too. I'll elaborate what I know further down.

These methods are rather generic (in a non object-oriented way), but are set up to read through an application's subdirectory called 'Skins' and return all the skins into functional menuitems which will be put into a menu called themes. Change and adjust as necessary.

Saturday, 14 January 2012

C# - How to make an MD5 hash of a string


Ok, so you're building an application that uses some kind of authentication for its users and you need to store their passwords. Are you going to just shove them in your database in plain text? Would you be happy if the various sites you use did that with your sensative data? I didn't think so, buddy.