Functional(ish) C# & MVVM: Single-Responsibility and Code-as-Data

I’ve spent the last year working in C# and WPF. Over a few blog posts, I have alluded to a particular pattern of structuring code, referring to it as “stateless single responsibility” objects or “stateless SRP” objects. For the purposes of this post I will call the pattern “stateless single responsibility principle” (SSRP) objects. I’d […]

WPF RadioButtons: Choices, Choices

Radio buttons are a common way for a user to select a single choice from several options. In this post, I’ll go over several ways of using RadioButtons in the Microsoft .Net Windows Presentation Foundation (WPF) framework. The Basic RadioButton The first thing to know about WPF RadioButtons is that, unless otherwise specified, all RadioButtons […]

Reactive Extensions + WPF? Yes, Please

In my recent post on IObservables, I discussed augmenting the ReactiveExtensions library with the ability to “cache” a Select() call. One of the ways I am using this in my current project is to provide the same data to multiple UI elements. Sadly, WPF does not directly support IObservable for data binding. However, with a […]

Complicated UI Widgets in WPF

One of the pleasant surprises I encountered while using WPF was how easy it is to change the look of a button. It is very easy to draw buttons using simple shapes, rounded corners, and so on. Sometimes, though, your application’s needs will require more complicated work. For example, say you need to make an […]