Recently we have decided to replace the logging framework we used, because of its not necessary complexity and a bunch of features we did not use and even did not know anything about. The goal was to use the built in System.Diagnostic.Trace facility and cover some of basic requirements we had.
CSS has been around for a while and will stay for a while longer and although I think it’s a good and working ‘language’ it has a few pitfalls – the biggest one being the lack of ability to reuse certain parts. Take colors for example, when you want to style a site you need to repeat the color declaration everywhere you want to set it, so when you change your mind, the only way to implement the changes is search and replace. Now that’s not that bad when you have a small site and one css file, but when the number of files grows, that problem grows along. So what can we do?
Today I will show you a simple way to have a pie chart in your WPF application with use of ItemsControl. The pieces of the pie will be binded to the undergoing item model collection. Let’s take a look at it.
In a previous post I showed you how to use IDataErrorInfo interface to implement simple validation mechanism in WPF MvvM application. In this post we will try to extend and customize this approach a little.
Windows Presentation Foundation allows us to create our own value converters and use them in XAML bindings. WPF also comes with a set of predefined converters. One of them is BooleanToVisibilityConverter. It this post I will show you how to create own version of this converter with parameter feature supported.
I wanted to have a reusable email validator since there have been a few cases already where I needed one. Previously I just used the RegularExpressionAttribute but that’s verbose for email. So, without thinking much, I created an attribute that derived from RegularExpressionAttribute and supplied it with a regex I used – that turned out to be a surprise.
I’ve heard a lot of advice about how I should and how I should not concatenate strings. I’ve stuck to them, but the moment of questioning was inevitable. So I spun up a small app to see what’s what. If you’re interested, read along.