Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows.

Similar presentations


Presentation on theme: "A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows."— Presentation transcript:

1 A Lap Around Windows Presentation Foundation

2 Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows Forms MFC Win32 HTML DirectX Data Binding

3 Windows Presentation Foundation provides… Unified approach to UI, Documents, and Media Integration as part of development and experience Integrated, vector-based composition engine Utilizing the power of the PC throughout the graphics stack Declarative programming Bringing designers directly into application development

4 Three “real-life” WPF Applications

5 Windows Presentation Foundation… “Windows Presentation Foundation is the future of Windows presentation technology” WPF is great for… Web sites that want to push the limits of user experiences Windows applications with complex data visualization scenarios However, other technologies are often still better choices today Windows Forms is still the best solution for mainstream rich client Windows applications Windows Forms is still the best solution for mainstream rich client Windows applications DirectX is still the platform for extremely intensive graphics (games, CAD applications) DirectX is still the platform for extremely intensive graphics (games, CAD applications) ASP.NET is the reach solution for server-based platform- agnostic applications ASP.NET is the reach solution for server-based platform- agnostic applications

6 Architecture

7 What is XAML? eXtensible Application Markup Language Declarative markup language for describing user interfaces

8 Why Declarative? vs. Hello World! Button btn = new Button(); btn.Background = Colors.Red; btn.Content = " Hello World! " ; this.Children.Add( btn ); Button btn = new Button(); btn.Background = Colors.Red; btn.Content = " Hello World! " ; this.Children.Add( btn );

9 Designer Developer Why have XAML?

10 First Look at XAML

11 Types of WPF applications Hosted in IE7 Installed on user’s system Partial trust Full trust Limited control of window Full control of window Online only Online / Offline Best deployed with ClickOnce Deployed with ClickOnce or MSI Browser Installed

12 A Browser-Based WPF App

13 Layout CanvasStackPanelDockPanelWrapPanelGrid

14 Layout Models in WPF

15 Controls All standard controls represented Some new controls Classes are unique to Windows Presentation Foundation System.Windows.Controls, not system.Windows.Forms.Controls

16 Style Lookless controls Provide default look-and-feel, can be overridden Logical Tree vs. Visual Tree Logical tree is a binary representation of the source XAML Visual tree is a scene graph which contains all the rendering data needed to compose the page Override the Visual Tree to style controls

17 Logical and Visual Trees <StackPanel> Cat Cat Dog Dog Hello World! Hello World! </StackPanel>

18 Actions Triggers Allow some UI events to be handled by XAML, rather than code-behind Useful for things like “mouse over” effects Events Controls support all standard events such as click, key press, selection changed, etc Events are handled in a code-behind file using either C# or VB

19 Controls / Styles / Actions Triggers

20 Data Binding Target Any property, any element Source CLR Object WPF Element ADO.NETXML Multiple models One Time One Way Two Way Control “Data Item” Property Binding Property

21 Putting it all together

22 XPS Content Fixed Documents High-fidelity fixed layout for precise printing and viewing WYSIWYG

23 Content Flow Documents Paginated, multi-column rich text

24 XPS Content

25 Co-existence with Windows Forms WPF ships with technology allowing for the creation of “hybrid” applications containing both WPF and Windows Forms content.

26 Goals of “Crossbow” Preserve existing Windows Forms investments Leverage existing ActiveX and 3 rd party controls Allow customers to migrate to WPF at their own pace, avoiding total rewrites

27 “Crossbow” Technology Services to support co-existence Unit conversions Focus and Keyboard management “Extensible property” management Two “host” controls WindowsFormsHostElementHost Simultaneous data source binding Extend Visual Studio’s designers

28 Limitations to “Crossbow” Limited to only one top-level control However, that control may be a container for many children Windows Forms controls will always appear atop WPF controls Limitation to Z-Order logic

29 Windows Presentation Foundation Resources Dev Center Guidelines http://msdn.microsoft.com/windowsvista/experience/ Windows Presentation Foundation Home http://msdn.microsoft.com/windowsvista/building/presentation/default.aspx Microsoft Expression http://www.microsoft.com/products/expression/en/default.mspx Interop / Migration http://msdn.microsoft.com/winfx/reference/presentation/default.aspx


Download ppt "A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows."

Similar presentations


Ads by Google