InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

What’s new in WPF 4.0?

Posted by Jonathan Allen on Nov 04, 2009

Sections
Development
Topics
Rich Client / Desktop ,
.NET
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
Re: WPF not suitable for LOB apps?! by Jonathan Allen Posted
Re: WPF not suitable for LOB apps?! by 陆 超 Posted
Re: WPF not suitable for LOB apps?! by Ryan Riley Posted
What about memory leaks and performance? by Roxana Grigore Posted
Re: What about memory leaks and performance? by Ryan Riley Posted
UpDown not until post-4.0? by Andy Dent Posted
  1. Back to top

    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!

  2. Back to top

    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.

  3. Back to top

    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?

  4. Back to top

    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.

  5. Back to top

    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?

  6. Back to top

    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.

  7. Back to top

    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.

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.