Integration Vector Graphics Declarative Programming
In today’s world, developing a Windows application may require the use of any number of different technologies, ranging from GDI/GDI+ for 2D graphics, UI services (User32 or WinForms), or Direct3D or OpenGL for 3D graphics. On the contrary, WPF was designed as a single model for application devel- opment, providing seamless integration between such services within an application. Similar constructs can be used for developing storyboard animation, data bound forms, and 3D models. To take advantage of new powerful graphics hardware, WPF implements a vector-based composition engine. This allows for graphics to scale based on screen-specific resolution without loss of quality, something nearly impossible with fixed-size raster graphics. WPF leverages Direct3D for vector-based rendering, and will utilize the graphics processing unit (GPU) on any video card implementing DirectX 7 or later in hardware. In anticipation of future technology, such as high-resolution displays and unknown form factors, WPF implements a floating-point logical pixel system and supports 32-bit ARGB colors. WPF introduces a new XML-based language to represent UI and user interaction, known as XAML (eXtensible Application Markup Language—pronounced “zammel”). Similar to Macromedia’s MXML specification, within XAML elements from the UI are represented as XML tags. Thus, XAML allows applications to dynamically parse and manipulate UI elements at either compile-time or runtime, pro- viding a flexible model for UI composition.Following the success of ASP.NET, XAML follows the code-behind model, allowing designers and devel- opers to work in parallel and seamlessly combine their work to create a compelling UX. With the aid of design-time tools such as the Visual Designer for Windows Presentation Foundation add-in for Visual Studio 2005, the experience of developing XAML-based applications resembles that of WinForms devel- opment. Moreover, designers accustomed to visual tools such as Macromedia Flash 8 Professional can quickly ramp-up to building XAML-based solutions using visual design tools such as Microsoft Expression Blend. These tools are covered later in this chapter and throughout this book.