What’s new in WPF 4.0?
Three controls from the WPF Toolkit have been moved into the core release. Specifically, they are the DataGrid, DatePicker, and Calendar controls. As these already have Silverlight counter-parts, Microsoft is promising “99% API- and behaviorally-compatible” between the WPF and Silverlight versions. The DataGrid is of particular importance, as the lack of one has been often cited as proof that WPF isn’t appropriate for Line-of-Business applications.
There is already two post-4.0 releases planned, each including additional controls. The “Bag O'Tricks” will include AnimatingTilePanel, ColorPicker, InfoTextBox, ListPager, NumericUpDown, Reveal, TransitionsPresenter, TreeMapPanel. The other is a WPF Ribbon Control, which is currently available as a CTP.
On the graphics side, support for Pixel Shader 3.0 is being added. Previously WPF supported Pixel Shader 2.0 via the ShaderEffect. Probably more important to developers is LayoutRounding. This will force the layout engine to place elements on whole pixel boundaries. Currently controls can be aligned to sub-pixel boundaries, which can result in blurry UIs.
Speaking of blurry UIs, WPF’s well known text rendering problem has been solved. In order to do this, the old text rendering stack was completely replaced. Along with this comes several text formatting options that allow for some degree of fine-tuning.
Windows 7 has been getting particular attention. WPF 4.0 will be offering support for MultiTouch, Jump Lists, and task-bar integration. Thumbnail Toolbars are particularly interesting. They allow users to interact with an application even though the application is minimized.
On the data binding front, support has been added for binding to dynamic objects that implement the IDynamicMetaObjectProvider. This includes all DLR-based languages such as IronRuby and IronPython.
The Visual State Manager feature from Silverlight has made its way into WPF. WPF already had the far more powerful Triggers, but these are also much harder to use than Silverlight’s Visual State Manager.
WPF not suitable for LOB apps?!
by
Ryan Riley
May the DataGrid suffer a long, miserable, and agonizing death! DataGrids are NOT--I repeat, NOT!--required for LOB apps. If they are, you should be building your application in Excel or using Excel for your grid. You won't find a better tool for what your client really wants. I've been working on a LOB app for a client, and besides a few ListViews with the default GridView, we have no grids. Early on, we used a third-party grid, but we quickly pulled it. Why? They aren't necessary. Try to be creative; you can do a lot more with a Data Template and a List Box than you might think. This isn't battleship gray WinForms. If you have any doubts, pleas refer to the StaffLynx demo.
WPF is more than vector-based WinForms. Try something new, and let WPF shine. Please!
Re: WPF not suitable for LOB apps?!
by
Jonathan Allen
What about memory leaks and performance?
by
Roxana Grigore
Re: What about memory leaks and performance?
by
Ryan Riley
Re: WPF not suitable for LOB apps?!
by
陆 超
Re: WPF not suitable for LOB apps?!
by
Ryan Riley
That's really unfortunate. We hit some of that initially, but after they experienced it a bit, they loved it and wouldn't want to go back. However, another piece of the application was going to replace a number of financial spreadsheets, and we ended up showing a summary list and making the information available via Export to Excel. When someone wants a grid, I've found they usually want Excel.
I think we've used grids to the point that when users think about how they work, they now see grids. It's almost impossible to get a user to tell you what they do outside of the context of a grid-based application. Hopefully, that will be changing. Good of you to try, at least.
Educational Content
Large-Scale Continuous Testing in the Cloud
John Penix May 24, 2013
Managing Build Jobs for Continuous Delivery
Martin Peston May 24, 2013
Clojure in the Field
Stuart Halloway May 23, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think