The Angry Programmer

Progamming Blog
  • Home
  • Code
  • Relax
  • Shop
  • About
Twitter Facebook RSS
Home » Code

Login

  • Register
  • Recover password
May 2013
M T W T F S S
« Jun    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archives

  • June 2012 (1)
  • April 2012 (3)
  • March 2012 (3)
  • February 2012 (8)
  • January 2012 (14)
Geek Pi
The Angry Programmer
Mar05

MVVM TabControl

by The Angry Programmer on March 5th, 2012 at 11:22 pm

This is a quick demonstration of how to use the standard WPF TabControl inside MVVM. First of all, I’ve just set up some very basic ViewModels: This ones for each item (Tab) in the TabControl: And this one is the main view model that contains the items: Here you can see an ObservableCollection of the […] ↓ Read the rest of this entry…

 Comment 
The Angry Programmer
Feb09

Restricting number of running instances

by The Angry Programmer on February 9th, 2012 at 9:03 am

Just a quick post to show how to restrict the number of instances of your application running. I’ve done this one in WPF, but it should apply to all types of .Net applications. The main class is: You can download the code from here

 Comment 
The Angry Programmer
Feb05

Multi-Lingual UIs in WPF

by The Angry Programmer on February 5th, 2012 at 6:50 pm

Increasingly we’re being asked to do UIs in a multi-lingual manner.  Usually, it’s not until your 75% of the way through the project that someone pops their head up and says ‘oh, we can have the UI in a different language can’t we?’.  If they’re still breathing after you’ve finished strangling them, you then explain […] ↓ Read the rest of this entry…

 Comment 
The Angry Programmer
Jan22

Making WPF images ICommand aware

by The Angry Programmer on January 22nd, 2012 at 4:16 pm

Here’s a quick post to show how to make images (and any other framework element) react to an ICommand when clicked. I used to get this question quite a lot from developer’s using WPF for the first time. They’d get the bit about a button being able to run commands when pressed, but when it […] ↓ Read the rest of this entry…

└ Tags: .Net, c#, ICommand, Image, WPF
 Comment 
The Angry Programmer
Jan20

Code to HTML

by The Angry Programmer on January 20th, 2012 at 11:48 am

In the course of writing this blog, I’ve found it a pain to format my code into nice HTML. Thereby it not displaying very nicely, as pointed out by the ‘Angrier Coder’ in a previous post. Hopefully I will now be able to address this problem, having written a quick utility to help me do […] ↓ Read the rest of this entry…

└ Tags: .Net, c#, HTML, Utilities
 Comment 
The Angry Programmer
Jan18

MVVM ComboBox with Enums

by The Angry Programmer on January 18th, 2012 at 3:26 pm

I decided to write an MVVM version of binding enum values to a ComboBox for WPF. I know there are lots of examples of how to put enum values into combo boxes, but most of them either use ObjectProvider or derive their own class from ComboBox. I don’t like inheritance, I prefer extending classes, as […] ↓ Read the rest of this entry…

└ Tags: .Net, c#, MVVM, WPF
3 Comments
The Angry Programmer
Jan17

MVVM ListBox Grouping

by The Angry Programmer on January 17th, 2012 at 5:09 pm

This is an example to show the use of MVVM in creating a grouping listbox.  The example shows a list of employees with their job title, name and grade.  I’ve defaulted to non grouping and supplied two buttons on the window to allow you to toggle the grouping between job title and grade.  This is […] ↓ Read the rest of this entry…

└ Tags: .Net, c#, MVVM, WPF
 Comment 
The Angry Programmer
Jan16

MVVM Series Part I

by The Angry Programmer on January 16th, 2012 at 2:03 pm

In this basic introduction to MVVM, I will be taking you through setting up an MVVM application and some simple binding to text and commands. This is intended for developers who know C# and Visual Studio, but an unfamiliar with MVVM. Let’s jump straight in: Create a new solution, selecting WPF application First thing to […] ↓ Read the rest of this entry…

└ Tags: .Net, c#, MVVM, WPF
3 Comments
The Angry Programmer
Jan07

Virtual Hell

by The Angry Programmer on January 7th, 2012 at 5:04 pm

Today, I had the misfortune to come across some code that looked highly dodgy to me. I’ll do the short version, as the class was so abysmal, that my brain would hurt pointing out the rest at this stage.  I’ll just show you the school boy errors and wonder how they ever got through the […] ↓ Read the rest of this entry…

└ Tags: .Net, c#
 Comment