What to look forward to in WPF vNext
With all the focus on Silverlight, and more recently HTML 5, a lot of people have been wondering about the future of WPF. This in quite understandable, as silence from Microsoft’s press machine often means that the project is on hold, possibly forever. However, it could also mean they aren’t ready to reveal what they are working on.
In the case of WPF, it is definitely the latter. While you will have to wait until the PDC to get all of the details, Rob Relyea, the Principal Program Manager Lead for WPF, has helped us assemble a peek into what’s coming. Our review starts with Pete Brown's post back in October titled “The Present and Future of WPF”. Here you will find some examples of real programs, both inside and outside of Microsoft, that use WPF as well as the summary of what was in WPF 4.
Near the bottom of that piece you see this bullet list:
- Hosting of Silverlight content with the new SilverlightHost element, without airspace issues (the inability to overlap WPF content over native Windows hWnd content)
- Overall better management of airspace with hosted native hWnd-based content like the WebBrowser, HwndHost and WindowsFormsHost
- Enabling binding and change notification for collections that are created on a background thread
- Better integration with UI virtualization
- Integration of the Ribbon control
We asked Rob to clarify a few points:
InfoQ: Has airspace issues been a concern for a lot of customers or is this a relatively rare problem?
It is a concern for many serious ISVs (and other types of customers too) who are hosting Win32 or Web content inside a WPF application. Our focus, as per my PDC 2010 talk, is on complex ISV applications.
InfoQ: Can you go into a little more detail about the SilverlightHost element and how you see it being used?
Some customers are building Silverlight and WPF applications. We’re exploring scenarios where you can host Silverlight content, that you’ve written for one app (perhaps a customer facing application) in a full .Net application.
InfoQ: For binding and change notification are you planning on offering a thread-safe observable collection out of the box? Or will this be more along the lines of giving us the tools needed to build our own?
This work doesn’t rely on observable collection…any INotifyCollectionChange collection will work. You just have to tell us how to participate in its locking scheme. We ask you to register for an event, and opt into collection sharing behavior, or not.
InfoQ: A lot of the .NET libraries have been moving to an out-of-band model where they aren’t tied to the overall release schedule for Visual Studio and .NET. Do you see the same thing happening with WPF?
We’ve discussed these possibilities in the past. We haven’t announced details of our next ship vehicle (timeframe, etc…)…I don’t want to release details (one way or the other) before we release all details.
InfoQ: Can you point me to some more information on how the Expression team combined C++ with WPF?
Henry Sowizral did several talks about this: http://channel9.msdn.com/blogs/psychlist1972/henry-sowizral-on-refacing-c-with-wpf-in-expression-design
Paul Harrington talked about Visual Studio as well: http://www.microsoftpdc.com/2009/CL09 (How VS 2010 was built with WPF 4)
3rd party applications like JMP 9 also still use a lot of their existing C++. Perhaps TurboTax as well (but I don’t recall).
InfoQ: On a different topic, what's your thoughts on bringing XAML 2009 into WPF? Last time I heard about it was at your "The Future of XAML" session back in 2009. It would be interesting to see how generics would play with custom controls.
Finishing our XAML2009 investment, including x:TypeArguments in our markup compiler, is something that we realize many customers would like. In our WPF vNext planning, that work didn’t end up on the list of things we’d be doing this release though.
Looking elsewhere we find mention in Microsoft Connect that INotifyDataErrorInfo is planned for the next version of WPF. This will certainly be welcomed by those who are reusing the same model or view-model across WPF and Silverlight. And speaking of Silverlight, here is the guidance from Pete Brown in case you missed it.
Speaking of guidance, I'm often asked for guidance with how to choose between WPF and Silverlight. Here's what we recommend when starting a new application:
- If you're just starting out, and there's a question as to which technology to choose (Silverlight or WPF) then start with Silverlight. It is generally easier to move up to WPF from Silverlight than it is to move the other way. Silverlight has a smaller API, and is therefore generally considered easier to learn.
- If you need a desktop application with only basic system integration, consider building a Silverlight Out-of-Browser application. Silverlight 4 Trusted Applications with IDispatch support provide access to many system resources previously unavailable to web technologies.
- If you need deep system integration, excellent multi-touch support, device access, local resources, and all the other things that go with a solid desktop application, then consider moving up to WPF.
- If you're a C++ developer, you can choose to go with C++ and MFC, or use C++ with WPF on the front end, like the Expression team did.
WPF / Mono
Now that Mono's developers got fired, it may be a good time to come in like knights in shining armor and do so.
But they still won't, because that would hurt their (slowly eroding) Windows margins.
So, no, we won't be using or recommending it any time soon.
Re: WPF / Mono
Re: WPF / Mono
As for WPF, well it is still a much nicer toolkit than Silverlight. I program in both, and even out of the browser Silverlight feels like I'm wearing handcuffs.
Re: WPF / Mono
Re: WPF / Mono