As a result, there??™s no good way for the painting in one control
(for example, the glow effect behind a button) to spread into the area owned by another
control. And don??™t even think about introducing animated effects such as spinning text, shimmering
buttons, shrinking windows, or live previews because you??™ll have to paint every detail
by hand.
The Windows Presentation Foundation (WPF) changes all this by introducing a new
model with entirely different plumbing. Although WPF includes the standard controls you??™re
familiar with, it draws every text, border, and background fill itself. As a result, WPF can provide
much more powerful features that let you alter the way any piece of screen content is
rendered. Using these features, you can restyle common controls such as buttons, often without
writing any code. Similarly, you can use transformation objects to rotate, stretch, scale,
and skew anything in your user interface, and you can even use WPF??™s baked-in animation
system to do it right before the user??™s eyes. And because the WPF engine renders the content
for a window as part of a single operation, it can handle unlimited layers of overlapping controls,
even if these controls are irregularly shaped and partially transparent.
Underlying the new features in WPF is a powerful new infrastructure based on DirectX,
the hardware-accelerated graphics API that??™s commonly used in cutting-edge computer
games.
Pages:
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64