InfoQ

News

What’s new in WPF 4.0?

Posted by Jonathan Allen on Nov 04, 2009

Community
.NET
Topics
Rich Client / Desktop
Tags
WPF ,
.NET Framework 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 Posted Nov 5, 2009 12:11 AM
Re: WPF not suitable for LOB apps?! by Jonathan Allen Posted Nov 5, 2009 12:23 AM
Re: WPF not suitable for LOB apps?! by 超 陆 Posted Nov 6, 2009 12:17 AM
Re: WPF not suitable for LOB apps?! by Ryan Riley Posted Nov 6, 2009 8:36 AM
What about memory leaks and performance? by Roxana Grigore Posted Nov 5, 2009 5:45 AM
Re: What about memory leaks and performance? by Ryan Riley Posted Nov 5, 2009 8:35 AM
UpDown not until post-4.0? by Andy Dent Posted Nov 12, 2009 7:00 AM
  1. Back to top

    WPF not suitable for LOB apps?!

    Nov 5, 2009 12:11 AM 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!

  2. Back to top

    Re: WPF not suitable for LOB apps?!

    Nov 5, 2009 12:23 AM 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.

  3. Back to top

    What about memory leaks and performance?

    Nov 5, 2009 5:45 AM 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?

  4. Back to top

    Re: What about memory leaks and performance?

    Nov 5, 2009 8:35 AM 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.

  5. Back to top

    Re: WPF not suitable for LOB apps?!

    Nov 6, 2009 12:17 AM 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?

  6. Back to top

    Re: WPF not suitable for LOB apps?!

    Nov 6, 2009 8:36 AM 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.

  7. Back to top

    UpDown not until post-4.0?

    Nov 12, 2009 7:00 AM 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.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.