WPF 4.5 Brings Various Improvements
Windows Presentation Foundation (WPF) brings a variety of new features to developers in its latest release. WPF 4.0 included features with widespread impact, including a brand new text rendering stack and graphics/animation refinements. By contrast WPF 4.5 focuses on stability and performance improvements while providing new features that are more evolutionary and targeted to specific areas. The new features recently highlighted by Pete Brown at TechEd 2012 include support async/await, inclusion of the Ribbon control, data binding, and collections.
The Ribbon control is now considered a full member of WPF and is available without a separate download. Support for the async/await keywords across the Windows tool set continues with their inclusion in WPF 4.5.
Data bindings can now be managed such that developers can set a delay to configure when they should update. This can reduce system load as the UI will no longer try to keep up with every change made by the user. For example without a delay set, moving a slider control can quickly generate update notifications that could overwhelm an application and provide a stuttering UI response.
Using the weak event pattern has been simplified with the inclusion of the WeakEventManager. This pattern is “used when listener doesn't know when to unhook [an] event handler”. This manager is suitable for most situations, but developers can derive a custom manager when higher performance is needed.
Cross-thread access is improved to provide for synchronized collections. The use of a lock allows a collection to be updated by any thread. Previously only the originating thread could modify the collections it created.
Finally, WPF 4.5's virtualization support allows for finer granularity on the feedback provide by controls that scroll. This allows scroll units to be specified (pixels / items) according to the situation so that the user feedback is more precise. Caching is also configurable so that the UI does not lead to load all items before providing a response.
Application using WPF 4.5 will have runtime support on Windows 7/8 and Windows Server 2008 R2 / 2012. Development requires Visual Studio 2012 running on one of those same platforms.
Roy Rapoport Aug 28, 2014