<<

Direct3D[edit] Graphics, including desktop items like windows, are rendered using . Thi s allows the display of more complex graphics and custom themes, at the cost of GDI's wider range of support and uniform control theming. It allows Windows to o ffload some graphics tasks to the GPU. This reduces the workload on the computer 's CPU. GPUs are optimized for parallel pixel computations. This tends to speed up screen refreshes at the cost of decreased compatibility in markets where GPUs are not necessarily as powerful, such as the netbook market. The Windows Presentation Foundation (WPF) is Microsoft's UI framework to create applications with a rich user experience. It is part of the .NET framework 3.0 a nd higher. WPF's emphasis on vector graphics allows most controls and elements t o be scaled without loss in quality or pixelization, thus increasing accessibili ty. With the exception of Silverlight, Direct3D integration allows for streamlin ed 3D rendering. In addition, interactive 2D content can be overlaid on 3D surfa ces natively.[6][7] Data binding[edit] WPF has a built-in set of data services to enable application developers to bind and manipulate data within applications. It supports four types of data binding : 1.one time: where the client ignores updates on the server. 2.one way: where the client has read-only access to data. 3.two way: where client can read from and write data to the server 4.one way to source: where the client has write-only access to data LINQ queries, including LINQ to XML, can also act as data sources for data bindi ng.[7] Binding of data has no bearing on its presentation. WPF provides data templates to control presentation of data. A set of built-in controls is provided as part of WPF, containing items such as button, menu, grids, and list box. A powerful concept in the WPF is the logical separation of a control from its ap pearance. A control's template can be overridden to completely change its visual appearance. A control can contain any other control or layout, allowing for a high degree of control over composition. Features graphics. Repainting the display isn't always necessary. Media services[edit] The WPF provides an integrated system for building user interfaces with common m edia elements like vector and raster images, audio, and video. WPF also provides an animation system and a 2D/3D rendering system.[8] WPF provides shape primitives for 2D graphics along with a built-in set of brush es, pens, geometries, and transforms. The 3D capabilities in WPF are a subset of the full-feature set provided by Dire ct3D. However, WPF provides tighter integration with other features like user in terfaces, documents, and media. This makes it possible to have 3D user interface s, 3D documents, or 3D media. There is support for most common image formats: BMP, JPEG, PNG, TIFF, Windows Me dia Photo, GIF, and ICON. WPF supports the video formats WMV, MPEG and some AVI files by default, but sinc e it has Player running beneath, WPF can use all the codecs instal led for it. Templates[edit] In WPF you can define the look of an element directly, via its properties, or in directly with a Template or Style. At its simplest a style is a combination of p roperty settings that can be applied to a UI element with a single property attr ibute. Templates are a mechanism for defining alternate UI for portions of your WPF application. There are several template types available in WPF (ControlTempl ate, DataTemplate, HierarchicalDataTemplate and ItemsPanelTemplate). Control Templates Underlying all UI controls in WPF is a new composition model. Every control is c omposed of one or more visuals. These visual sub-elements are turned into a hierar chical Visual Tree by WPF and eventually rendered by the GPU. Because WPF contro ls are not wrappers for standard Windows controls their UI can be radically chan ged without affecting the normal behavior of the control. Every control in WPF has a default template that defines its visual tree. The defa ult template is created by the control author and is replaceable by other develo pers and designers. The substitute UI is placed within a ControlTemplate. Data Templates WPF has a flexible data binding system. UI elements can be populated and synchro nized with data from an underlying data model. Rather than showing simple text f or the bound data WPF can apply a Data Template (replaceable UI for .NET types) before rendering to the Visual Tree.