Last time, I walked through an implementation of Miller Columns in WPF that I had posted on StackOverflow, but it ended with a few issues.
- It was incomplete. I didn’t post the entire implementation, and much of the context was lost between then and now.
- The implementation wasn’t very MVVM. It required a specific type to be used as a data context, whereas in MVVM proper, the view model should be completely decoupled from the view.
- The solution required a code behind. This isn’t necessarily a bad thing, but I’d like to see if we can develop a pure-XAML solution.
Continue reading “WPF Miller Columns, Part 2”
Today we’re going to look at a very useful UI element: Miller Columns. If you’ve ever worked in a Mac environment, you’ll probably recognize this from the Finder’s column view. Continue reading “WPF Miller Columns, Part 1”
It’s been several years since Microsoft announced that Newtonsoft’s Json.Net would be the default JSON serializer. If you deal with JSON communication over the web at all, you probably already know this. It’s not exactly news.
However, there does seem to be a small desire among those in the web development community who would like to use alternate serializers. Personally, I’d like to use my own serializer, Manatee.Json. I originally created it out of a dissatisfaction with Json.Net, and naturally (and perhaps from some bias) think it to be superior.
Continue reading “Microsoft Did It Wrong”
I recently encountered this little gotcha at work, and thought it could benefit others, so… here you go.
When you start an animation in WPF from code and then make an awaitable call, the animation fails to show until the call is complete. Why is this? Continue reading “WPF Animations and the Async/Await Model”
We often hear about a turning a field from an art into a science, but we rarely (if ever) hear about turning a science into an art. I assure you it’s there, and I assert that one without the other is usually a horrible thing. Continue reading “The Art of Coding”
Sometimes, when we’re building an application, we need to run a script either before or after the build process. Fortunately, Microsoft took this need into consideration when they built Visual Studio. There, in the project properties, under Build (Compile if your one of those weird VBers), you have two multiline text boxes in which you can write your scripts: one for pre-build, and one for post-build. They even give you a button which opens a window with a scrollbar for when your script is more than three lines long. But still, something seems to be off with it. And this “something” is the primary cause of (read: what I’m blaming for) my latest computer panic/fiasco. Continue reading “The Mother of Copy/Paste Errors”
The last time we looked at code, we covered user-defined serialization between data models and JSON. Today, we would have reviewed auto-serialization, but I’ve hit a snag. I recently did some performance testing, and found that Manatee.Json was quite slower than its nemesis, Newtonsoft.Json (or more familiarly, Json.Net). Continue reading “Manatee.Json (Part… Oops!”
There have been many posts on the features of C# 6. Probably the most thorough (however now a bit dated) I’ve seen is this one.
When I first read about these new features, I was discouraged about the direction the language is headed, and I still am for some of these. I therefore emailed my not-so-local C# expert to solicit his opinion on some of them. He has allowed me to share some of his responses to my concerns. Continue reading “C# 6 Features I Don’t Like”
Static classes cannot be instantiated. That means they serve only serve one purpose: providing data and functionality to all areas of an application. They are a close relative to the evil global variable.
Continue reading “The Case Against Static Classes”
Most sites and books that teach WPF will tell you to declare all of your converters in XAML and then reference them using the
StaticResource markup extension. I disagree. Unless you’re super-careful about it, you’ll end up creating mutliple instances of various converters. Continue reading “Static WPF Converters”