1 / 16

Mastering WPF: Graphics and Multimedia Framework

Explore the power of Windows Presentation Foundation (WPF) to integrate various multimedia platforms and create stunning graphical interfaces efficiently. Learn XAML for GUI design and exchange data using XML for compatibility.

bernadinec
Download Presentation

Mastering WPF: Graphics and Multimedia Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CHAPTER 15 WPF Windows Presentation Foundation Dr. John Abraham Professor, UTPA

  2. Windows Presentation Foundation • It is the framework for all graphics and multimedia. • In the past different platforms had to be used to accomplish, video, sound, etc. • With WPF, it can integrate other platforms into it. • In the toolbox there is a section for WPF.

  3. XAML (Extensible Application Markup Language) • In WPF when GUI is added XAML markup statements are created to describe the GUI controls. • Upon compilation the XAML compiler generates code to create and configure controls based on XAML markup. • XAML is implemented with XML.

  4. XML • Standard for describing data • Data thus described may be exchanged between different applications over the internet. • XML describes information in such a way both humans and computers can understand.

  5. XML - EXtensible Markup Language. • XML was designed to describe data and to focus on what data is. • XML tags are not predefined. You must define your own tags • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data • HTML was designed to display data and to focus on how data looks

  6. XML stores data, Does not display • XML can Separate Data from HTML • With XML, your data is stored outside your HTML. • XML is Used to Exchange Data • With XML, data can be exchanged between incompatible systems • With XML, financial information can be exchanged over the Internet

  7. An Example XML Document <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

  8. Displaying XML http://www.w3schools.com/xml/xml_display.asp

  9. Formatting and Manipulating XML documents XML documents contain only data May us XSL (Extensible Stylesheet Language) to specify rendering instructions for different platforms.

  10. XSL (Extensible Stylesheet Language) A group of three technologies XSL-FO (Formatting Objects) Vocabulary for specifying formatting XPath for effectively locating structures and data in XML documents XSLT (XSL Transformation) For transforming XML documents into other documents.

  11. XSLT SLT is a language for transforming XML documents into XHTML documents or to other XML documents. http://www.w3schools.com/xsl/xsl_transformation.asp

  12. Programming using XAML GUI programming XAML document defines the appearance of Windows Presentation Foundation application.

  13. XAML program 1 <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Hello Program" Height="300" Width="300"> <Grid Background="Gold"> <Label HorizontalAlignment="Center" VerticalAlignment="cENTER" FontSize="25"> WELCOME TO WPF </Label> </Grid> </Window>

  14. Explanation • Application.xaml.vb is the code behind class and handles application-level events. 2 standard namespaces must be defined Presentation XAML namespace (Microsoft presentation site) Standard XAML namespace (Microsoft xaml site) – this site is assigned to x

  15. WPF Controls • Presented by elements in XAML markup. • The root element is a window control (this is similar to the form control in our vb programs)

More Related