Chapter 5: Windows Presentation Foundation''s objectives is a vital component to the future of application development, allowing developers to take control of the sheer power that is available at the desktop to develop rich, interactive, media-enhanced user interfaces...”.
Chapter Windows Presentation Foundation Do Thi Ngoc Quynh Ha Noi University of Technology Objectives “The Windows Presentation Foundation is a vital component to the future of application development, allowing developers to take control of the sheer power that is available at the desktop to develop rich, interactive, media-enhanced user interfaces ” Microsoft Agenda WPF Introduction XAML Programming WPF Applications Building Your First WPF Application Exploring the Layout Controls Working with XAML Controls Working with Graphics, Media and Animations New in WPF 3.5 Future Directions of WPFSummary Microsoft Part WPF Introduction… Microsoft Presentation Layer Architecture: From Yesterday to Tomorrow Punch-card request/response architecture Microsoft Terminal-based request/response architecture Presentation Layer Architecture: From Yesterday to Tomorrow Request/response architecture of user graphical user interface (GUI) application talking to mainframe Microsoft Presentation Layer Architecture: From Yesterday to Tomorrow Web browser–based request/response architecture Microsoft Sophisticated browser architecture Presentation Layer Architecture: From Yesterday to Tomorrow The NET Framework provides consistent browser, desktop, and server application programming interfaces (APIs) Microsoft How you develop your client applications? One set of technologies—based on HTML, DHTML, Asynchronous JavaScript and XML (Ajax), and Microsoft ASP.NET Atlas gives you the same level of sophistication that a “heavy” client can give you using “light” technologies The other approach: WPF Microsoft including a declarative XML markup language named Extensible Application Markup Language (XAML) that defines the user interface, but has an incredibly powerful runtime supporting it The Windows SDK The Windows SDK contains all the APIs for developing next-generation Windows applications provides the foundation for software development for the Windows server and client platforms for the foreseeable future The Windows SDK is centered on the NET Framework 3.0, sometimes called NetFX Microsoft which contains the classes you are familiar with from the NET Framework 2.0 in addition to WPF, WCF, and WWF 10 Data Binding New Debugging Mechanism Support for IDataErrorInfo Alternative Syntax for Data Validation LINQ and XLINQ Support Microsoft 123 Controls RichTextBox TextBoxBase SoundPlayerAction Protected Set Accessors Microsoft 124 Documents FlowDocumentPageViewer, FlowDocumentScollViewer, and FlowDocumentReader each have a new public property called Selection Microsoft 125 Annotations A new interface, IAnchorInfo, has been added A new method, GetAnchorInfo, which returns an IAnchorInfo object, has been added to the AnnotationHelper class Microsoft 126 Part Future Directions of WPF… Microsoft WPF Advantages WPF supports hardware acceleration WPF applications can take advantage of GPUs on Graphics cards for smoother graphics WPF allows the effective separation of design work (to be performed by Designers) and functionality (to be performed by Developers) Microsoft Advantages… WPF supports a new model for content under which almost any control can host almost any other control This permits very rich user interfaces as almost any control can support 3D graphics, animations and even videos WPF supports almost complete scalability Microsoft Advantages… WPF was designed from the ground up for managed code Microsoft WPF benefits from years of experience with NET Disadvantage WPF At the present time there are certain controls available in Windows Forms for which no WPF equivalent exists Eg DataGridView and PropertyGrid The learning curve for WPF is very, very steep Microsoft WPF and Windows Vista (1) WPF does not explicitly require Windows Vista WPF also will work with Windows XP Service Pack and with Windows Server 2003 SP1 Of course, WPF does require Version 3.0 of the NET Framework, a free download from Microsoft Microsoft NET Framework 3.0 is automatically included with Windows Vista WPF and Windows Vista (2) There are some relatively minor features of WPF which are only supported on Windows Vista Microsoft 3D objects only get anti-aliasing on Windows Vista or later Non-rectangular or translucent windows only get hardware acceleration on Windows Vista or later WPF and XAML XAML is a declarative programming language designed for constructing and initializing NET objects XAML code is principally the textual representation of some visual element – either a graphic object or a user interface object such as a button or a combo box Microsoft WPF and Silverlight Microsoft Silverlight is a web-based subset of WPF During development it was named WPF/E, which stood for "Windows Presentation Foundation/Everyw“ The Silverlight subset enables Flash-like web and mobile hereapplications with the same code as Windows NET applications 3D features are not supported, but XPS and vectorbased drawing are included Microsoft 135 Summary The Windows Presentation Foundation (or WPF), is the graphical subsystem feature of the NET Framework 3.0 and is directly related to XAML It provides a consistent programming model for building applications and provides a clear separation between the UI and the business logic A WPF application can be deployed on the desktop or hosted in a web browser Microsoft 136 References Books: Microsoft Laurence Moroney “Foundations of WPF” 137 ... System .Windows System .Windows. Automation System .Windows. Controls System .Windows. Controls.Primitives System .Windows. Data System .Windows. Documents System .Windows. Forms.Integration System .Windows. Ink... System .Windows. Ink System .Windows. Input System .Windows. Media System .Windows. Media.Animation System .Windows. Media.Effects System .Windows. Media.Imaging System .Windows. Media.Media3D System .Windows. Media.TextFormatting... supporting it The Windows SDK The Windows SDK contains all the APIs for developing next-generation Windows applications provides the foundation for software development for the Windows server