Windows Presentation Foundation
User Experience: Recent Past Web HTML Sacrificed UX for portability, connectivity and simplicity 1997 – DHTML Interactivity for the web; not heavily used until recently 2005 – Increasing Interactivity The “rediscovery” of DHTML Windows 1994 – Win32 New level of functionality for installed applications Many libraries on top including MFC, ATL, VB 1996 – DirectX Gaming platform for Windows 2002 – Windows Forms Developer productivity for Win and Beyond Rising demand for richness
MSN Hotmail (today) MSN Hotmail (beta) Office: Outlook User Experience Matters Productivity Software
User Experience Matters Consumer Software HTMLDHTMLWinFX
Rising Expectations for User Experience DHTMLWin32Direct 3D ASP.NET “Atlas” Windows Forms Windows Presentation FoundationWPF/E
WPF: Windows or Web? WPF applications are delivered securely either stand-alone or hosted in a browser
Powerful & Productive Programming Model User Interface Reading & Documents Graphics & Media Presentation Technologies Win32 (User, GDI) Direct 3D Windows Forms WPF
Windows Presentation Foundation BUILD THE APPLICATIONS YOU ALWAYS DREAMED OF BUILD THE APPLICATIONS YOU ALWAYS DREAMED OF
The WPF Approach Unified approach to UI, Documents, and Media Integrated development and experiences New Windows Infrastructure Retained graphics, vector based engine Built on modern display hardware (D3D) Modern development framework and patterns Designers and Tools Matter Bringing designers into the process Declarative programming models for toolablity and flexibility
Designer - Developer Workflow Hayao MiyasakiAnders Hejlsberg
Windows Presentation Foundation Demo
Declarative Programming with “XAML” “Markup for Windows” Build applications in simple declarative statements Can be used for any CLR object hierarchy Code and content are separate Streamline collaboration between designers and developers Easy for tools to consume and generate OK LightBlue Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; Dim b1 As New Button b1.Content = "OK" b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100
XAML or Code? Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.Light Blue); b1.Width = 100; Compile and Run OK LightBlue Load, Parse, Display BAML ParseLoad, Display
XAML or Code? Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.Light Blue); b1.Width = 100; OK LightBlue “Code Behind” Class Partial Class Public Button b1; Public Button b2; Load (“My.Baml”) My.Baml Parse & Generate Compile and Run
Window1.xaml.csContains: Application logic Created by: Application developer Window1.xaml Professional Version Window1.xaml Consumer Version Window1.xaml Media Center Version targeted experiences
WPF Architecture
Windows Presentation Foundation Demo
Integration with existing Apps Can use WPF with existing code WPF inside existing code Existing code inside WPF Integrate at the component or Window level Maximum richness => all WPF
Mixed App Considerations Higher long-term cost, lower initial cost Run in browser Integrate your business logic Using XAML in C++ Airspace & layered windows
WPF File Edit View Help Win32 DirectX Airspace Each pixel belongs to one hwnd File Edit View Help Win32 WPF DirectX
File Edit View Help Win32 DirectX WPF Airspace – caution! WPF File Edit View Help Win32 DirectX
Mixed Application Ideas New canvas New chrome Faster canvas?
Mixed Application Ideas Wizards and help systems Generate HTML => Generate XAML WPF wrapper around an existing control
Call To Action Build Great Windows Vista Applications Help create and ride the upgrade wave Learn how WPF can help you improve your application Invest in your User Experience Involve Designers Make a leap in functionality Choose the right way to move your codebase forward
Enable better product differentiation through improved user experience while providing higher development productivity.