Design Vista

For one thing, unlike inherently static print, onscreen design can be dynamic. To bring applications to life, WPF offers real-time animation of properties such as position, size, colour and opacity, right down to individual glyph level. Significantly, such animation is time based rather than frame based as it is in Flash, which makes the process much simpler to set up, control and edit later (although it does somewhat reduce its flexibility). It also frees the animator from having to cater to the lowest common denominator, since the length of an animation is no longer dependent on the processor, with faster systems capable of providing smoother results.

Design Vista

Of course, it isn’t just text that WPF supports: it extends GDI+’s existing support for bitmap images from the most popular standards such as BMP, JPEG and GIF, to include Microsoft’s impressive new multipurpose WMPhoto specification. In addition, WPF provides its Windows Imaging Component (WIC), a dedicated API that enables third-party developers to write and add their own custom codecs, which, once installed, immediately become available to all applications for reading, saving and conversion – particularly useful for handling new camera RAW formats. You can also use WIC to add proprietary metadata to image files, ensuring it never gets lost or separated.

As you’d expect, bearing in mind its new rendering engine, WPF’s vector graphics handling is also seriously enhanced. In fact, it’s been totally overhauled, starting with support for shape primitives such as rectangles, ellipses and polygons, and the ability to create your own geometries, which are then handled just as efficiently. This declare-once, use-many-times approach extends to formatting through the concept of “brushes”, which are applied to geometries as fills and strokes. Each brush can be a solid colour, a linear or radial gradient (with multiple stops), a vector drawing or a bitmap (which can be tiled or stretched as desired). Each of these options can also be used as an opacity mask to offer fine control over transparency. In addition, WPF provides built-in rotate, scale, skew, translate and customisable matrix transforms.

Crucially, WPF also moves beyond the traditional GDI territory of static bitmaps and vector images into providing full multimedia support, including both audio and video. Exactly which codecs will be supported on release isn’t yet clear, and sadly there’s no WIC-style extensibility for third-party formats to ensure maximum choice, efficiency and future proofing. However, Microsoft’s own popular and bandwidth-friendly WMA and WMV formats are naturally supported, making it as simple to add a soundtrack or video to a WPF project as it is to add a static image.

WPF not only brings audio and video into the mainstream, but also does the same for 3D graphics, treating them as just a natural extension of 2D (which, given WPF’s routingof graphical tasks through the Direct3D pipeline, is just what they are). Geometries, brushes and transforms are all supported in 3D as well as dedicated concepts such as cameras, models, lights and materials. For the insatiable demands of immersive gaming, advanced Direct3D hardware support will still be desirable, but WPF’s built-in capabilities are sufficient for the important job of merging 2D with 3D content – which is especially useful for adding spinning logos, rotatable e-commerce product displays and After Effects-style 3D transitions between 2D content. This power will almost certainly be abused – prepare for a blitz of spherical video clips – but when used sensibly and subtly can give a project real depth.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos