BT

What’s new in WPF 4.0?

by Jonathan Allen on Nov 04, 2009 |

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.

Hello stranger!

You need to Register an InfoQ account or 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

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

WPF not suitable for LOB apps?! by Ryan Riley

"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."

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

Trust me, I believe you. But it is going to take a long time before the countless LOB developers, including myself, become comfortable showing massive amounts of data without traditional grids.

What about memory leaks and performance? by Roxana Grigore

Is there any improvement regarding the performance, especially the performance of adding/changing elemets? Is there any improvement regarding the memory consumption and solutions for memory leaks?

Re: What about memory leaks and performance? by Ryan Riley

You'll find some useful information here for versions 3.0, 3.5, and 3.5 SP1. I'm also curious as to any improvements for WPF 4.0. The Reactive Framework should help with the eventing issues, if that's used. I know it's at least used in Silverlight 3.0 now.

Re: WPF not suitable for LOB apps?! by 陆 超

The thing is, after showing them my super creativity, my client strongly insisted to rebuild the UI in grid style. They have been seeing grids in every other application, they asked why the hell wouldn't you just do it like them?

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.

UpDown not until post-4.0? by Andy Dent

Why is this control taking so long to arrive? I'm having to write my own because I'm porting 10-yo Macintosh code to WPF and the client insists on it matching the Mac controls.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

7 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT