2. Ted Hu ::tedhu@microsoft.com / twitter: @tedhu Community Program Manager Microsoft Windows Presentation Foundation
3. Objectives Give You A Concrete Understanding of WPF 4 New Features in WPF 4 Windows 7 light up Tooling improvements Tells You Which Features Can Also Be Used With .NET 3.5SP1 and How 3.5 SP1 is Preinstalled with Windows 7 Answer Questions (during Q&A) 3.5 SP1
4. .NET 3.5 SP1Prior Art Released on 11 August 2008 Number Of Bug Fixes And Improvements Feature-packed Service Release Performance. 15-45% performance improvements for key startup and runtime scenarios Startup: Optimizing CLR NGEN layout, disk I/O, JIT code gen Runtime: Graphics, data, text, to animation Deployment. .NET 3.5 SP1 Client Profile, ClickOnce Graphics. Extensible Shader Effects with HLSL support, Direct3D Interop 3.5 SP1 More @ http://windowsclient.net/wpf/wpf35/wpf-whats-new-35sp1.aspx
5.
6. Common set of tools (VS, Blend), and programming model (XAML, .NET)
29. Pixel Shader 3Scott Guthrie’s WPF 4 blog post http://weblogs.asp.net/scottgu/archive/2009/10/26/wpf-4-vs-2010-and-net-4-0-series.aspx
30. WPF 4 Windows 7 Taskbar Integration Multitouch Improved Fundamentals Graphics: Cache Composition, Pixel Shader 3 New Text Rendering Stack Layout Rounding Deployment Streamlined : Client Profile, ClickOnce Enabled Visual Studio’s UI and Editor Better Tooling
31. WPF for Windows 7 Rapid Application Development on Win7 Innovations Multi-Touch Taskbar DirectWrite for Text Rendering Control Toolkit (Ribbon, etc.) Common Dialogs File Explorer Presence and Customization More… Use with .NET or via XAML in WPF
32. WPF Taskbar Integration Thumbnails toolbars Icon overlays Progress bars Jumplists With XAML Support 3.5 SP1
34. WPF 4 Multitouch UIElement changes Manipulation Events (tracking and interpreter) Touch System Gesture events (double-tap, rollover) Raw Touch Input Events (for going to the metal) Multi-touch support in controls ScrollViewer Update to accept pan gestures Base Controls Updated to be multi-touch aware Multi-capture Support for more than one contact point at time New Multi-touch Controls e.g. ScatterView Compatible with Surface SDK 2.0
35. Touch Development Roadmap Windows 7 Release NET 4 / Surface 2.0 Release Native Win32 Application WinFormsApplication WPF Application Surface Application Surface SDK 1.0 Surface SDK 2.0 Multi-Touch Controls Surface Multi-Touch Controls & API Multi-Touch API WPF 3.5 SP1 WPF 4 WPF 3.5 Managed Wrapper and Interop Managed Wrapper and Interop Multi-Touch API and Controls Surface Hardware Windows 7 Surface Hardware Windows Vista Windows 7 Multi-Touch API
36. Microsoft Pivot Seesmic Look Available now at http://fishbowlclient.com Multitouch Taskbar demo
37. WPF 3.5 SP1 Multi-Touch Support Enabling Multi-touch Input Multi-touch Input via Stylus events Implementing Multiple Capture Using Win7 Manipulation and Inertia Processors Windows Multitouch Sample .NET Interop Library http://code.msdn.microsoft.com/WindowsTouch 3.5 SP1 14
38. Windows API Code Pack for .NET Vista and Windows 7 Restart and Recovery Transactions Search Network and power aware Windows 7 Sensor Platform Federated Search Controlling any related services More… 3.5 SP1
39. FundamentalsA Quality-First Release Framework Deployment Application Deployment Text Clarity Layout Rounding / Snapping Graphics Performance Improved Interop UIAutomation – For accessibility and VS Test Tools
40. Framework Deployment .NET 4 is a Side by Side release! Visual Studio 2010 supports multi-targeting (e.g. Silverlight + WPF v3 and 4) Client Profile SKU & Setup Improvements
41. Client Profile SKU Smaller, Faster NET Framework SKU .NET Framework Client: 28mb Setup optimizations for ngen, download, etc. Works across ALL CONFIGURATIONS Brandable deployment experience Developers can customize app deployment experience to match brand Can integrate framework and app installers Tools and documentation for creating these packages Easier application deployment Developers may use deployment bootstrapper to manage the installation of their app and pre-reqs Will install application after the framework and launch it (.msi, .application or .xbap) 3.5 SP1
42. Setup and Size .NET 4 Client Profile is the default target in almost all VS 2010 Client Project Templates (WinForms, WPF, VSTO) Supported on all OS that Full .NET is .NET 4 Full & Client offer big improvements 75%+ size reduction over earlier versions 48 MB Full (x86/x64); 28 MB Client (x86) Both Full and Client Support x86 & x64 Size on media combined x86/x64 package
43. Setup and Client Profile .NET 4 Full & Client Profile Size & Deployment Perf Client x86=~28MB, Client x86/x64=~41MB (similar size to x86 3.5SP1 Client Profile with lots more features ) Full x86=~35MB , Full x86/x64=~48MB (from ~240MB in 3.5Sp1 ) Client Profile is a First-Class Citizen Client Profile Is The De Facto Framework that will be available on Windows Update for desktop PCs Can Be Serviced Independently (of Full Framework) as Standalone & serviceable package (does not require Full Framework) Supported by Visual Studio 2010 in all respects (e.g. targeting, deployment project, etc).
45. What is ClickOnce? Technology to help deploy, version and update rich clients Supports automatic detection and deployment of application updates Provides bootstrapping capabilities Applications execute in a secure sandbox with support for safe permission elevation
46. ClickOnce Deployment Originally released with .NET Framework 2.0 .NET Framework 3.5 Can move deployment locations Can support third-party publishing and branding Manifest Generating and Editing Tool improved .NET Framework 3.5 SP1 Can publish unsigned applications Better FireFox support Design-time file associations
47. ClickOnce Deployment Continuing Improvements For ClickOnce to enable more seamless app install & update Command-line arguments for CO-deployed apps File associations for CO deployed apps Background auto-updates and custom install User Experience 3.5 SP1
51. Problems Solved by ClickOnce Choice of web, UNC or CD installation On demand feature deployment Automatic application updates Support for application rollback Removal of version conflicts … Administrators can control how applications are granted permissions, safe elevation
54. Text in WPF 4 APIs In a Nutshell <Page ... <StackPanel TextOptions.TextRenderingMode="ClearType" TextOptions.TextFormattingMode="Display"> <TextBlock Text="This will use Display mode formatting and render with ClearType"/> </StackPanel> </Page>
55. Text APIs TextFormattingMode Ideal.Maintains high fidelity with their outlines from the font file (default behavior which uses IdealWidth text metrics) Display.Glyph has width of multiple whole pixels and is positioned on whole pixels (optional new behavior which uses CompatibleWidthtext metrics) When To Use Ideal Mode Large Text – As text size increases, Ideal clarity issues dissipate. After ~15pt, Ideal mode is as clear & better spaced than display mode text Transformed Text – If transform is applied to text, Ideal mode should be used. Ideal mode text is designed to be drawn anywhere Zoomed Text – Zooming text is a special case of transformed text. Zoomed text should be implemented by increasing the text size When To Use Display Mode Small Text – Smaller WPF text (<~15pt) can appear more blurry. If so, switching to display mode should help
56. Text APIs TextRenderingMode Aliased (aliased rendering) Grayscale (grayscale antialiasing) ClearType (ClearType always on) Auto (ClearType unless otherwise specified in the system font smoothing options) Comparison of ClearType ,Grayscale, Aliased text using Display TextFormattingMode
58. Layout Rounding WPF Uses DPI-independent Graphics System Objects Fall “Between Pixels” Side Effects: Rendering Artifacts Anti-aliased blurriness Semi-transparent edges Layout Rounding Non-integer Pixel Values Are Rounded To Whole Numbers during Measureand Arrange UseLayoutRounding.Rounds an object’s coordinates on whole pixels
60. Graphics Composition API – give application authors fine grained control over caching rendered elements in video memory An input to a shader effect A brush to fill any arbitrary 2D shape A texture on a 3D model Text Rendering – New and Improved (on all Windows versions) Pixel Shader 3 Support 256 65,000 instructions Extends 3.5 SP1’s ShaderEffect with PS 3 support Tools like Shazzam edit and test Pixel Shader Effects http://www.shazzam-tool.com
61. Cached Composition BitmapCacheenable caching of entire or partial visual tree Avoids Re-rendering Costs per-frame Significant Performance improvements possible Fully Interactive. Remains responsive to user input Respects Dirty Regions and invalidates accordingly Fine-grain control for quality of Cached visual RenderAtScale. Fine-grain knob to set trade-off between re-rendering costs vs. quality, e.g. Processor/memory ++ 1, 2, 20X…n scale
79. WPF Apps @ Microsoft Expression Design and Encoder Deep Zoom Composer Enterprise Library 5.0 Semblio Microsoft Pivot SQL StreamInsight Debugger Microsoft Surface PowerShell ISE Microsoft Test & Lab Manager (for VSTS) Active Directory Administrative Center
80. #Feedback: Performance! #VS2010add reference dialog is much faster! Can I get a AMEN? The developers on the Visual Studio 2010 RC must have had their usual beverages replaced with unicorn tears or something VS2010 RC is fast, I wonder what happens when they hit RTM, it'll be like a cheetah, should be called VS Cheetah!!! Just tried VS2010 RC. One word incredible. Super fast, great build with things I saw in earlier releases fixed. So awesome. #vs2010 is fast like ambulances flying through a school zone at 120 mph being chased by ninjas. and the ninjas are on fire! VS 2010 RC performance is ridiculously faster, can't wait to switch over full time!
81. More #Feedback “Definitely a MASSIVE improvement since VS2010Beta2… So much better than the beta2 that it's hard to know where to start… GREAT WORK GUYS.” “This release works much faster and is more responsive than VS 2008.” “I was concerned about the time that particularly xaml files were taking to load - this is now way better.” “My impression of XAML editor performance seemed better – particularly in the designer.” “I’ve used the latest build over RDP and on my tablet, and I am very happy with the state of VS2010.” “Involving partners and [the] community to take feedback is a good strategy!” “Add References was fast! :) “IntelliSense seems to be faster/snappier than VS2008 – great job!”
82. More #Feedback @DanWahlin: The performance improvements with Visual Studio 2010 RC compared to previous builds are huge. Really happy with what I'm seeing so far. @peterbromberg: VS2010 RC: I must admit, I am impressed. Major speed and performance improvements. They are obvious immediately! @Nick_Craver: RCperformance is ridiculously faster, can't wait to switch over full time! @Rlz2cool: Just tried VS2010 RC. One word incredible. Super fast, great build with things I saw in earlier releases fixed. So awesome. @ddotterer: Trying out VS2010 RC: Snappier UI, much faster IntelliSense, significant build time reduction, etc. Overall: AWESOME JOB @tomkirbygreen: Oh my goodness, VS2010 RC is much, much faster. Kudos to the VS perf team and everyone else. Uninstalling Visual Studio 2008 :-)
83. WPF 4 Improvements for VS 2010 Text Stack WPF 4 Now Use DirectWrite for much improved text clarity WPF 4 English Text is faster (~10%) compare to WPF 3.5 SP1 Improved JPN MS Gothic Font perf (the VS10 JPN default) UIAutomation Improvements significantly improve Visual Studio performance on tablets and touch-enabled PCs Graphics New API To Allow Editor Line-scroll to be significantly more efficient over RDP and update less area. Improve Reliability On VMs. Added API to allow WPF apps to force SW rendering per process enabling Visual Studio 2010 to use SW rendering
84. WPF 4 Improvements for VS 2010 XAML WPF Designer Template Parsing now ~2x faster MEF VS & Editor Extensions use XAML catalog for better perf WPF Designer and Blend share same XamlDom -> ObjectGraph code MSBuild Uses XAMLto parse build properties files Tree Services Improved Focus Management ExclusiveMenuMode enable better management of keyboard focus between WPF and interop components in MenuMode RestoreFocusMode allow VS full control over focus restoration amongst interop components Performance: Use cached copy of DispatcherSynchronizationContextto improve Editor Scroll scenarios (~25%+ gain)
85. Controls Now in WPF 4 DataGrid, DatePicker VSM Controls Toolkit Chart Controls Themes Ribbon More coming after RTM… More at http://wpf.codeplex.com 3.5 SP1