CTO Universe

WPF

How does reactive programming work? “It’s all streams,” our program manager explained. “When you update a property in one part of the system, it causes another property in a different part of the system to update, too. It will take a bit to wrap your mind around.” In my head, I pictured properties all over […]

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 […]

I ran into a situation the other day where I had to turn on/off the visibility of a text run in WPF, and I discovered that text runs do not have a visibility property. Whenever I run into a situation where I need to add functionality to a control, I always turn to attached properties […]

If you’re developing WPF applications and do not have Snoop installed; install it now. I’ll wait. Installed? Good. Snoop is an open source tool for spying and debugging a running WPF application. It can be used to inspect your running application and make changes while your app is still running. I’ve found it to be […]

Data binding establishes a connection between the application UI and business logic. When it works, it’s a wonderful thing. You no longer have to write code that updates your UI or pass values down to your business logic. When it breaks, it can be frustrating to figure out what went wrong. In this post, I will […]

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 […]

Did you know that you can write inline C# in your XAML file with the x:Code Intrinsic type? When I stumbled on this feature, my first reaction was, “Wow, I didn’t know you could do that!” After several years of using WPF, I thought I knew all the tricks. Discovering something new was exciting! The initial […]

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 […]

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 […]

Recently, I have been using WPF to give a .NET desktop application its own customized look and feel that matches my client’s product branding. In one of the workflows I implemented last week, the user inputs a 4-digit passcode that allows them to connect to an external device. Here is a diagram of the workflow […]