Chris Donnan : Programming - Brooklyn Style
software, trading, family, fun
Posted .net, wpf on Friday, September 5th, 2008.
General WPF + WPF Blogs:
http://wpfwiki.com/
http://www.beacosta.com/blog/ (great for databinding)
http://blogs.msdn.com/mikehillberg/default.aspx
http://joshsmithonwpf.wordpress.com/
http://blogs.msdn.com/wpfsdk/default.aspx
http://drwpf.com/blog/Default.aspx?base
http://karlshifflett.wordpress.com/
http://wpfdisciples.wordpress.com/
Unit Testing WPF
http://miketwo.blogspot.com/2007/03/unit-testing-wpf-controls-with.html
http://www.codeproject.com/KB/WPF/unittestingwpf.aspx
WPF Articles
http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx
http://blogs.msdn.com/mikehillberg/archive/2006/09/14/WpfTraceSources.aspx
http://www.codeproject.com/KB/WPF/UserControlAsDataTemplate.aspx
http://www.codeproject.com/KB/WPF/VMCommanding.aspx
Fav Tools:
Posted .net, wpf on Monday, September 1st, 2008.
After ~1 mont of earnest all day type WPF programming, I have come to see the wisdom of the much blogged about, microsoft touted/ originated Model-View-ViewModel pattern for WPF apps.
After many years of all day Windows Forms programming, I had my style down. WPF, I have been doing pet projects with it for ~1.5 years. Now, using it for day to day work, I am finding myself doing things differently. I feel the WPF coding evolving towards something and I think I have organically evolved my current work to Model-View-ViewModel.
Here is a linkfest:
- The DataModel-View-ViewModel pattern series This is basically the pivotal series on the topic
- Here is Josh Grossman’s (2005) article on the topic, how it the pattern has been used in Expression (Sparkle) design
- This is an aside article, but I empathise as I believe I began down the same route (binding directly to the raw datamodel, as opposed to the ViewModel)
- A good practical article from Josh Smith on using the pattern with the WPF tree view
- Another article from Josh Smith, a bit of an extension, but I have been looking for a more natural feel for commands, this seems a good match.
I managed not to say anything, but to include a bunch of good ref’s and say that I am feeling increasingly at home with WPF.
As long as I can be productive for my business, write less code that is more maintainable, I will be a happy camper. I am still reaching for a good way to have dependency injection fit in fundamentally into my WPF work. It is there, but I want it deeper!
-Chris-
Posted wpf on Tuesday, August 26th, 2008.
So in my last post, I blogged about WPF components. I have veen deep with the ones I mentioned and more in the past 2 weeks and I have reached some conclusions about WPF component vendors. I have also eval’d more vendors out there to add to my list.
So last post, I was continuing to actively review:
- Infragragistics
- ComponentOne
- Developer Express
- Syncfusion
I was mainly looking @ their grids as my #1 needed component. I can say that I have spent a fair bit of time now with each one, and I have some solid opinions. I have also drilled down a level and reviewed the suites from other vendors including:
- Xceed
- Telerik
- DivElements
- and even Nukeation’s Reuxables reusable WPF themes
At the end of the day, there is actually a fair bit of usable vendor software out there. The grid was by far the hardest to select as there are just so many ‘bells and whistles’ you can have in a grid product.
My WPF Vendor Grid Rankings
- Xceed
- Infragistics
- ComponentOne
- DevExpress
- Telerik
- Syncfusion
That is not uber-precise, but it is my general feeling. Here is a random list of features I was looking for:
- performance
- summaries
- hierarchical data
- quality data-templating
- general ‘feel’ of the grid
- sorting
- skinning
- auto-filter
- any Excel-like features
- API feel
- out of the box embedded editors
- documentation/ examples
Other WPF components (excluding the grids)
That ranking is just for my grid. Interestingly, my least favorite grid implementation was Syncfusion’s, but they actually had the best (IMO) general controlls suite; The Syncfusion WPF Tools set. I compared this with Infragistics control suite for the most part. I did look at all the above mentioned vendors, and the ones in contention were mainly Syncfusion and Infragistics.
Infragistics seemed to focus on ‘bling’. They had really nice carousel controls, but financial apps are no place for those unfortunately. They had a few basic ‘editors’, but syncfusion just had a few more.
Docking and Ribbon control; both Syncfusion and Infragistics offered good Ribbon controls and Docking controls. They all look the same. The APIs are very similar (unsurprisingly). I liked them both.
Explorer bar; Infragistics latest CTP has an explorer bar, and Syncfusion has one out. Infragistics gave me some bugs while working with it, so I could not get too deep. It kept blowing out my XAML files unfortunately. I am sure it is just fine, once it is out of beta.
Syncfusion also has a handy Autocomplete control. It is not fantastic, but it was in use in minutes and I got good use of it fast. Infragistics has no analogy.
Syncfusion has the following controls:
- Ribbon
- Explorer bar
- Autocomplete
- Task bar
- Docking
- Font list/ combo box
- Gallery (cool)
- Datetime edit
- Numeric Up/ down
- Color Picker
- Advanced Tree View
- Clock
- Masked Text Box
- Integer Text Box
- Double Text Box
- Calendar Edit
I could go on and on. Essentially, this is what I have so far. I hope it is helpful to someone/ anyone!
-Chris-
Posted .net, wpf on Sunday, August 10th, 2008.
Well, I have been building toy projects with WPF for some time now. I have been monitoring and trying Acropolis, Prisim and whatever the heck they call prism now. I have been closely monitoring the landscape of 3rd party vendors.
In order to be productive and deliver real, purposeful applications I need to be able to focus on the business domain (finance/ trading in my case). I DO NOT want to build low level widgets. I do not want to rebuild the wheel. In order to do this, I need to use a component vendor. This gives your application ‘perceived integrity’ inasmuch as your users will see something and touch something that looks like a modern application, not a 1995 web page with java applets and midi songs.
So - I have been following the big vendors and their WPF offerings:
* Infragistics
* Syncfusion
* ComponentOne
* Developer Express
I have ben waiting for Developer Express in particular to come out with their grid offering. They released it not too long ago. Syncfusion also released their grid not too long ago. Infragistics has had the longest lived WPF product suite. Grids are the most important component in my world. The other components are also important, but grids are king in my world.
I need minimally:
* Grid
* Docking/ MDI management
* Toolbars/ Ribbon
* General Editors
DevExpress
As far as grids go, DevExpress is my favorite WinForms grid provider. It is fast, flexible, good in every way. Their WPF grid is nice enough, but not nearly as plush as their WinForms grid.
Their other great component is their layout component. It is still not in their WPF Suite. Unfortunately, they only have a chart offering and a grid. They are not quite there yet.
* Grid
* Charts
Syncfusion
At one point (in WinForms days), Syncfusion was the darling of wall st IT departments. They were fast, the only one that did a good enough job supporting real time market data. At a point, the rest of the grid vendors caught up and in Developer Express’ case, surpassed Syncfusion. Their WPF grid offering feels immature to me. Aside from a grid they do have a more complete offering than say Developer Express:
* Grid
* Docking
* Several nice editors
* Charts
* Ribbon
* Taskbars/ Groupbars
* An auto-complete control
All in all, they have a nice package, notwithstanding the grid which as I mentioned - feels immature.
Component One
I have never really been a big fan of Component One. Their WPF Offering still has an uncomfortable feel to me. They currently offer:
* Grid
* Schedule
* Charts
* Reports
I have played with the grid a bit. I wanted to like it, but it just doe snot feel right to me… I realize that is qualitative, but so be it.
Infragistics
Well, Infragistics has the best grid currently. It does the most stuff, feels the realest, seems the most extensible. It just does what you expect. Now in WinForms land the Infragistics grid always had a big API, but it generally was SLOW. With my former employer we had several meetings with the people responsible for WPF at Infragistics and they were very reactive to our performance requirements. They also just came out with their Docking Manager, which was missing and important. Their current suite consists of:
* Grid
* Carousel
* Charts
* Several Editors
* Docking
* Ribbon
There are a number of smaller vendors that have one bit or another. This is OK for open source stuff - but I really do not want 10 different micro component vendors. Ideally, we could have 1 vendor. In the past I have almost always had 2 vendors - Infragistics for everything but the grid, then developer express or syncfusion for the grid.
Conclusion
I think that in conjunction with Prism, there is a farily compelling platform for building non-trivial front office trading applications presently. With the current ’stuff’ that is out there, we should be able to focus on the business facets, and deliver a real application in a timely fashion.
Posted .net, wpf on Thursday, July 17th, 2008.
Composite Application Guidance for WPF aka PRISM
is out! This is essentially CAB for WPF. CAB had some significant shortcomings. I have been following Acropolis, Prisim, CAB etc for as long as they have been around. I think that this release is pretty useful/ meaningful and I would bet that some real applications will be built on this.
I have been waiting for a really full featured grid to be ‘ready’ to consider WPF ‘ready’. Infragistics still has the most mature offering - but their grid still pales in comparison to DevExpress’s Windows Forms grid. DevExpress’s WPF DXGrid is around now- but it is still eons behind their WinForms grid…. Sad…
I guess we will have to just go about our business and soon enough there will be a real WPF grid. Don’t get me wrong - they LOOK nice and they ARE rich and functional - just not the same as the WinForms versions. It was the same for a while with the MFC controls and the WinForms controls -I think it is just a matter of time.
-Chris
Posted .net, books, c#, wpf on Wednesday, July 16th, 2008.
I am not sure if I have posted on this yet - but just in case I have not…
Charles Petzold’s 3D Programming for Windows Book
is excellent. When Charles was kind enough to send me a copy of his book, I was not ready to dig deep into 3d WPF. I have been reading more and more of this book - and I have really been enjoying it.
Charles also posted recently how important bloggers can be in the world of book sales. Now - I am no Jeff Atwood in the blogosphere, but I wanted to at least do my part to give some credit where due to Charles.
There you have it - go get the 3d WPF book. Not only is there ‘wpf’ stuff in there - but there is ‘how to really do 3d programming’ in there. If you have ever needed to sort out how to scale, bend, morph and manipulate 3d objects - WPF will help - but technique will help just as much.
-Chris

Posted mac, programming, sliverlight, wpf on Sunday, March 9th, 2008.
You can now go and get the Dynamic Silverlight bits here. This will let you run Silverlight 2 applications based on IronRuby and IronPython in the browser. It feels like real WPF actually - you make xaml files, you make ruby files, you embed them in an silverlight applet in a webpage and you are good to go.
Not only this - but you can also build your Dynamic Silverlight apps with Mono on a Mac. the downloads have the things you need to do so.
XBAP based WPF applications will have the ‘full richness’ of WPF - but you will only run on Windows machines. I still need to sort out the security sandboxing models of XBAP applications and for Silverlight applications. How do you interact with local resources from a Silverlight app?? Can you?? How much client side state can you store in a Silverlight app - can I store 20 mb of static data in client memory?? Regarding XBAPS - can you do everything you can do in an installed WPF app via an XBAP app?? Questions, questions, questions.
With MIX 08 Happening this past week, there is just a ton going on in the Microsoft community. I also had to download the iPhone SDK (even though I have not bought an iPhone yet) just to see what it was all about since that was the other bug techie dev news this week IPHONE SDK!
Posted .net, programming, wpf on Tuesday, May 29th, 2007.
Infragistics NetAdvantage for WPFÂ - the most complete offering so far. We spent a few hours with some nice and bright folks from Infragistics this past friday. I did my best to tell them they need to make their grid fffffaaasssstttt!
SandDock for WPF - not tried it yet. Seems like it will be …. docking.
Xceed Datagrid for WPFÂ - looks nice. I will toy with it sooner than later - maybe next weekend.
Blendables Essentials Mix - seems like a newcomer. Looks like some potentially interesting stuff more on the real UI, 3d side of things.
WPF Ribbon - well - looks lovely. A ribbon is coming from Infragistics, but this one looks nice for now
Perhaps I will try this before Xceed’s grid.
ComponentOne Studio Enterprise for WPFÂ - Chart, Grid, Schedule .. not done yet. Later this year
Syncfusion - when last we spoke - I got the feeling it was a beginning of ‘08 thing at best. Sad - help us out here guys !
Thats about it. Please post more if you got ‘em.
-Chris
Posted .net, programming, wpf on Monday, May 28th, 2007.
I have had versions of all of this stuff installed for some months now. Stuff you ask… this stuff:
- Expressions Blend
- Visual Studio Orcas (and .net 3.5 friends)
- Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP
- Infragistics NetAdvantage for WPF
- ReSharper 3.0 EAP
All of these things -Â individually are nice and fine-ish. They all crash and flop - but they are somewhat OK. Now that I am trying to really do productive work using multiple of these together - I am agahst at the pain in the (*$ that I am having with these darn tools!!!! All I can say is that I cannot wait for a single IDE that I can use to make WPF based desktop apps.
- Resharper efforts - abandoned in Orcas (hard to work without it I must admit!). Too many flops - ‘nuf said. This is hard for me as I am a die hard fan! Working for the most part in VS2k5+Cider.
- Orcas - does not play nice - crashes while working a good bit. I will say the designer seems more stable than the Cider (VS2k5 Addins) stuff. The best part is really the nice designer, which I cannot get to play with Infragistics, but is lovely for the “base stuff”
- VS2k5 Cider Addins - designer flops hard - often - painfully, but I am still using it lots
- Blend - happy to say - relatively stable, using mostly with Infragistics stuff - both play nicely. I am NOT happy that the code editing has to take place - elsewhere, I cannot get a good flow here yet (I guess again - i am lost without ReSharper
). NO XAML Intellisense ???? - Infragistics stuff - nice in general. Not too many flops that I can attribute to some IGistics-ism. Once designing in Blend, and editing it more in VS2k5+Cider works
Again - it all works - more or less, it is just not like normal work yet. My current mode is still - style in blend where I can (using some inline XML Data Source stuff to make it look like something). Edit in VS2k5+Cider (Resharper works for the most part), back ‘n forth. Orcas is basically out of the loop - except stand alone “play”.
Thus far - that is my story - may it improve soon!
-Chris
Posted .net, programming, wpf on Sunday, May 27th, 2007.
OK - I have had a “pet project” using WPF for a few months now. We will be “starting for real” in a few months “at the office” it seems. I will have to have built ~2-3 pet projects over the next 2 months to be happy.
I wil say - the web is great. There is nothing better than working with WPF to understand what is happening. I think a lot of people have mixed thoughts about WPF, but for the past several years now, I have been trying to move to a more declarative style of programming in general. I have typically tried to make it so that i could wire together a bunch of stuff for a scenario using Spring.net - or hand rolled domain specific XML. This is in the spirit of XAML… They have objects that have lots of properties - then you declare the behavior as you need in XAML (or you let a tool do it more likely).
There are several key concepts that developers need to get a handle on. As soon as you get past the “initial playing around” with WPF and try to make a real, clean, well written, maintainable piece of software - you will need to really understand WPF and how it works. So, on to…
Understanding Dependency Properties.
Single most helpful statement in starting to understand WPF Dependency Properties:Â
Dependency properties and the WPF property system extend property functionality by providing a type that backs a property, as an alternative implementation to the standard pattern of backing the property with a private field.
From MSDN’s Dependency Properties Overview
Another useful statement can be foun in Windows® Presentation Foundation Unleashed
A dependency property depends on multiple providers for determining its value at any point in time. These providers could be an animation continuously changing its value, a parent element whose property value trickles down to its children, and so on.
Dependency properties are understood by XAML only. It is all “normal .net (C#)” but it is only meaningul within the context of XAML. Dependency properties give you a type as a property, so you get a level of indirection that buys you:
- Property change notification
- Support for different providers (various ways to change the value of the … uhm value)
- Property inheritance (think of it as propagation of a value to child controls)
The implementation of dependency props - it looks odd, but it makes sense if you think of it something like:
My class is implementing its property in a way that it can be hooked into WPF intimately.
(this is verbatim from the WPF Unleashed book)

The static DependencyProperty on top - is point of ref that wires up the connection in the static constructor. It is used to attach the change notification method, the metadata info, the type info, etc. (All this static business is a bit disconcerting for me as a TDD anti-singleton type.) Note the “normal” .net property IsDefault - looks like a normal property. The rest of that stuff is the implementation of the property - in such a way as WPF is “wired into it”. Now you get the Property change notification, property propagation, hook points for value changing, etc. Now your class is all bound to WPF… This is another item that provides food for mental thought…
That last paragraph has some uglies in it…
- #1 Static singleton stuff (you are bound to global stuff from your environment -ugh).
- #2 more of the same, your implementation is explicitly bound to its runtime environment.
I am open to new things
That said - those things make me a bit uncomfortable. I believe in a style of programming that allows you to be declarative, and to wire together components. I believe you can use labels, identifiers, strings, and all that stuff to be the glue to stick stuff together. This gets you a bit away from a very strong compile time safety, yet you get the benefits of a much more dynamic and flexible style of programming. I think the ideas of XAML works right into my general modus operandi. I think it is important to be careful to make sure we can still write testable code!
As systems get bigger and bigger and more complex - more risk is at play. Especially on Wall St - lots of $ can be lost if you are buggy. Testability is a cornerstone to sustainability. For me - the key takeaway is to ONLY bind up your presentation tier into the WPF specific stuff. Just like today - there are lots of apps where WAY too much is way up in the view code. I still want a POCO (plain old CLR object) feel when programming!
Anyhow - that is it for me - 2 year old is now awake and wants to play!
-Chris
Posted .net, programming, wpf on Sunday, May 13th, 2007.
Why is it that all us TDD-ers are not cheering about this yet… Let me be the 1st to cheer … yippie!
“Microsoft UI Automation is the new accessibility framework for Microsoft Windows. It addresses the needs of assistive technology products and automated test frameworks by providing programmatic access to information about the user interface (UI). In addition, UI Automation enables control and application developers to make their products accessible. “
Posted .net, programming, wpf on Sunday, May 13th, 2007.
Something like WpfSpy+++ - shows logical/ visual treem current props, zoom in/ out and more.
Check it out!
Chris