There are many ways to handle design-time data in view-models. While some people use complex dependency injection frameworks or inversion of control containers, the simplest method is to just check the DesignerProperties.IsInDesignTool flag. Unfortunately this has the side effect of embedding the design-time data into one’s application. Jeremy Likness offers a couple ways of working around this.
With Microsoft Surface SDK 2.0 one can write applications for both Surface and Windows Touch devices.
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.
Silverlight on the browser is better than ever. It is getting the same kind of performance improvements seen with HTML 5 while still benefiting from statically typed languages and JIT compilation. So why is Microsoft barely willing to talk about it at MIX?
Miguel de Icaza, founder of the Mono project, says that support for Windows Presentation Foundation on Mono is possible, but would require funding for 15 to 20 developers over a period of two to three years. As an alternative he proposes using other toolkits, but they too need community support.
When DevExpress released their roadmap for 2011, WinForms barely got a mention. As a ten year old technology that is basically abandoned by its creator this isn’t too surprising. But what it interesting the amount of negative feedback that generated. A lot of DevExpress’s customers just don’t see WPF or Silverlight as a viable replacement for their major applications.
WPF Application Framework (WAF) and Caliburn are two open source frameworks providing the foundation to developers to write WPF/Silverlight applications based on the Model-View-ViewModel (MVVM) pattern using a layered architecture.
Microsoft has released a new preview of their WPF-based Ribbon control. Though not the final version, it includes a go live license and a copy of the source code. The quality is quite high and it appears that all of the bugs and API design flaws from last year’s preview have been corrected. While the source code is available, the license only permits read-only access for debugging purposes.
Serena Yeoh, a Microsoft consultant and a contributor to Microsoft pattern&practices Application Architecture Guide, has created a Layered Architecture Sample for .NET 4.0 which was later ported to Azure, showcasing various .NET technologies (WPF, WCF, WF, ASP.NET, ADO.NET EF) used in an architecture based on the Layered Architecture design pattern.
The data binding in WPF and Silverlight is amazing in all regards. Its power and flexibility are beyond compare. Unfortunately its resistance to traditional debugging techniques is equally impressive for the wrong reasons. There is no way to really step through the data binding process, but we collected some other techniques that developers may find useful.
Windows Presentation Foundation is quickly becoming well known for the ease in which memory leaks are introduced. Most of these leaks seem to come from the use or misuse of weak references, upon which WPF’s data binding technology is based. In the recent set of hotfixes many of these leaks are fixed.
Visual Studio 2010 comes with a feature they call the “Binding Builder”. This tool, launched from the properties pane, helps developers quickly construct XAML bindings for WPF and Silverlight. But without some help, it doesn’t work when the data context is only set at runtime. Karl Shifflett shows how to work around this using design-time markup extensions.
Having modular code does not help when applications still have to be deployed in an all-or-nothing fashion. Prism addresses this by allowing you do deploy a WPF or Silverlight shell to the users separately from any specific functionality. Individual features are released out-of-band as modules that may be stored locally, on a corporate file share, or served up by a web site.
There is some confusion about when to use WPF and when to use Silverlight. Choosing the right technology for a project depends on precise requirements the application has and the differences between WPF and Silverlight’s capabilities.