If you want your application to contain lots of custom drawing, drop shadows, blended backgrounds and an almost CSS like way of designing the UI’s then WPF and MVVM is fantastic. “WPF makes the hard trivial and trivial hard” I can’t remember the exact quote but it went something like. To me it just seems a little heavy-handed and I really hope there must be a better way of doing things that I’ve just not found in my initial investigation. Is it a good or a bad thing that in order to change some relatively minor appearance of a standard control you have to copy the whole control template into your project and modify it? I really miss the ability to just change behaviour or appearance slightly with a cleverly constructed sub-class in winforms. 4 – Changing appearance of standard control It amazes me that WPF doesn’t include this ability as standard. I will get images and I can’t spend the time converting everything to vectors so sometimes I just want to show a bitmap without having to swallow a whole bottle of Kool-Aid. I’m not a purist and am regularly accused of committing coding horrors however, Dear Microsoft, Please support just showing a bitmap at normal resolution without resorting to blurring it. Now for another drawback when favouring vectors. I found this helped somewhat but still the output wasn’t very clean and for simpler graphics like the arrow or the tick I just resorted to drawing on graph paper and typing the ever so user friendly PathGeometry directly. The only bright ray of hope is Inkscape which will allow you to trace a bitmap to convert it into vector and also export xaml files. Now don’t get me wrong I like vector graphics just the tool support at the moment is terrible. Next up comes what is a strength of WPF, the vector graphics. Why no scrollbars? 2 – Poor editing support for Graphics Even then the designer doesn’t give the best of previews e.g. Really you have no choice but to hand code it if you want anything even roughly resembling something maintainable xaml. I liken it to using the experience using Word to edit HTML documents. The first thing I think any developer is going to notice about starting with XAML is that the visual studio designer is pretty poor (choosing my words carefully). I chose the rather excellent “WPF 4 Unleashed” by Adam Nathan to read through and “Pro WPF in C# 2010” by Matthew MacDonald as a reference whilst I programmed. I decided to read a book before attempting WPF for the first time as I’ve heard others complain about the steep learning curve. I decided to use writing a new tool as a way to learn WPF and MVVM and I thought I’d write down a few of my problems as a way of cathartic release.
0 Comments
Leave a Reply. |