Pages

Friday, May 11, 2012

Why WPF ?


Hardware acceleration. All WPF drawing is performed through DirectX, which allows it to take advantage of the latest in modern video cards.
 
Resolution independence. WPF is flexible enough to scale up or down to suit your monitor and display preferences, depending on the system DPI setting.
 
No fixed control appearance. In traditional Windows development, there’s a wide chasm between controls that can be tailored to suit your needs (which are known as ownerdrawn controls) and those that are rendered by the operating system and essentially fixed in appearance. In WPF, everything from a basic Rectangle to a standard Button or more complex Toolbar is drawn using the same rendering engine and completely customizable.

For this reason, WPF controls are often called lookless controls—they define the functionality of a control, but they don’t have a hard-wired “look.”
 
Declarative user interfaces. In the next chapter, you’ll consider XAML, the markup standard you use to define WPF user interfaces. XAML allows you to build a window without using code. Impressively, XAML doesn’t limit you to fixed, unchanging user interfaces. You can use tools such as data binding and triggers to automate basic user interface behavior (such as text boxes that update themselves when you page through a record source, or labels that glow when you hover overtop with the mouse), all without writing a single line of C#.
 
Object-based drawing. Even if you plan to work at the lower-level visual layer (rather than the higher-level element layer), you won’t work in terms of painting and pixels. Instead, you’ll create shape objects and let WPF maintain the display in the most optimized manner possible.

No comments:

Post a Comment