This document summarizes Sara Silva's presentation on Windows Presentation Foundation (WPF) at a meeting on January 23, 2010. The presentation covered an introduction to WPF including its architecture, classes and XAML, different types of applications, user interfaces using controls and layouts, resources like styles and dictionaries, and demonstrations of these concepts. It concluded with proposed future presentations on additional WPF topics like data binding, collections, styles and animations.
2. Sara Silva 3 anos de experiência profissional em TI Lic. Matemática: EspecializaçãoemComputação - DMUC MCPD: Windows Developer 3.5 MCTS: WPF 3.5 e Windows Forms 3.5
3. Agenda Introdução ao WPF Tipos de Aplicações Interface com o Utilizador - Layout e Controlos - WPFToolkit e WPF Ribbon Resources Styles
21. Referências Introduction to Windows Presentation Foundation (MSDN) http://msdn.microsoft.com/en-us/library/aa970268.aspx XAML Overview http://msdn.microsoft.com/en-us/library/ms752059.aspx WPF - Codeplex http://wpf.codeplex.com/ WPF Tutorial http://www.wpftutorial.net/Home.html Foundation Blend 2 : Building Applications in WPF and Silverlight http://www.windowspresentationfoundation.com/ XAMLPT http://xamlpt.com/
22. Propostas de Apresentações de WPF Manipulação de Dados: Binding,MultiBinding, IValueConverter, ValidationRule ObservableCollection, INotifyPropertyChanged ICollectionView e Group, Sort, Filter dados Styles e Animações Definindo Styles Trigger, Multi-trigger, EventTrigger, Data Trigger Control Template, Data Template, Template Storyboard Tipos de Animações Outras? ...
24. Obrigado! Sara Silva saramgsilva@gmail.com http://twitter.com/saramgsilva http://pt.linkedin.com/in/saramgsilva
Editor's Notes
WPF provides a very rich and highly integrated UI stack, exposed through a .NET programming model. Figure 1 illustrates the overall architecture and the key components of WPF.ARCHITECTURE: This diagram shows the basic architecture for WPF. Notice all the different media types (in yellow) that are handled by WPF: Vectors, Bitmaps, 3D, Audio and Video, Text and Effects! Second, notice how the animation capabilities of WPF spans across all the media types, allowing you to animate any kind of content. The WPF Composition Engine (in black) is one of the revolutionary features of WPF. This engine provides capability of having live content inside of another content. This means that you can have a 3D object rotating inside a Button control and furthermore you can have a video projected over the surface of the 3D object! This tree structure and nesting capability is available for all content and every control that WPF provides. WPF is not only about rich user interfaces but also about high fidelity information, connection and data. Controls, Layout and Databinding are just some of the examples of this power. The XPS format is a rich document definition that allows us to enjoy the best of WPF in a document. In summary, WPF represents an evolution in terms of richness, interactivity as well as information and data.Link:http://windowsclient.net/wpf/white-papers/wpf-app-quality-guide.aspx
WPF is structured by using subsystems or classes that are defined in different namespaces. These classes have a very deep inheritance hierarchy. Figure: shows these important classes and their relationships.The following list describes the classes that make up the WPF subsystems (links lead to documentation on the MSDN Web site for the individual class):Object. The base class for all .NET Framework classes. DispatcherObject. The base class that handles messages from other objects.DependencyObject (DO). The base class for any object that can support dependency properties (DPs). This class defines the GetValue and SetValue methods that are central to the operation of DPs.Freezable. The base class for objects that have a modifiable state and can be “frozen” into a read-only state for performance purposes.Visual. The base class for all objects that have their own visual representation. This class provides a tree of visual objects, each optionally containing drawing instructions and metadata about how to render those instructions, such as clipping, transformation, and so on. Visual is the entry point to the WPF composition system. It is also the point of connection between two subsystems, the managed API and the unmanaged milcore (the core of the WPF rendering system).UIElement. The base class for all visual objects, which provides support for layout, input, focus, and routed events (collectively referred to as LIFE).ContentElement. A base class that is similar to UIElement, but for content that does not have its own rendering behavior. In order to be rendered in the UI, ContentElement objects must be hosted in an object that derives from Visual.FrameworkElement. A base class that adds support for styles, data binding, resources, and a few common mechanisms for Windows-based controls such as tooltips and shortcut menus.Control. The base class that provides basic elements for GUI development, such as Button, ListBox, and so on. The controls separate the data model (properties), interaction model (commands and events), and display model (templates), which enables developers to completely replace their visual aspect.Shape. The base class for shape elements, such as Ellipse, Polygon, and Rectangle.Panel. base class for all Panel elements, which is used to position and arrange child objects in WPF applications. ContentControl. The base class for controls that can have only one child element. This child element can be anything from a string to a layout panel with a combination of other controls and shapes.ItemsControl. The base class for controls that can be used to present a collection of items, such as the ListBox and TreeView controls.Link: http://windowsclient.net/wpf/white-papers/wpf-app-quality-guide.aspx
XAML simplifies creating a UI for the .NET Framework programming model. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. The ability to mix code with markup in XAML is important because XML by itself is declarative, and does not really suggest a model for flow control. An XML based declarative language is very intuitive for creating interfaces ranging from prototype to production, especially for people with a background in web design and technologies. Unlike most other markup languages, XAML directly represents the instantiation of managed objects. This general design principle enables simplified code and debugging access for objects that are created in XAML.XAML files are XML files that generally have the .xaml extension.The following XAML example shows how little markup is necessary to create a button as part of a UI. The created button has default visual presentation through theme styles, and default behaviors through its class design.Link:http://msdn.microsoft.com/en-us/library/ms752059.aspx