SUMMARY

One of the main goals of WPF is to separate the user interface more completely from the code behind it. XAML lets you declaratively build a user interface and then later add code to handle the events that the application needs to perform. Because the user interface is separate from the code, you can assign different developers to work on each of them. You can have a graphics designer use a graphical XAML editor to build the user interface and have a Visual Basic developer write the underlying code. Later, the graphical designer can modify the user interface without forcing you to rewrite the code.

WPF includes hundreds of new objects for defining user interfaces. These objects let you build windows that take advantage of modern computer graphics hardware and can provide advanced features such as rotated and scaled controls. New drawing objects let you produce complex graphics at design time such as polygons, Bezier curves, and complex paths.

Resources and styles let you customize objects so that they are easy to change in a central location. Triggers, animations, and storyboards let the interface interact with the user at a very high level, so the bulk of your code doesn’t need to handle these more cosmetic chores.

New document objects let you display information that can flow to take best advantage of the available space, or that remain in fixed positions on any display device. Powerful document viewers let users scroll through documents, zoom in and out, print, and copy data to the clipboard.

WPF provides a huge number of powerful features, and this chapter barely scratched the surface.

In Windows Forms applications, Form objects play a special role. They represent the top-level user interface components in which all other controls reside.

In a WPF application, the situation is a little less obvious. A top-level object in a WPF application can be a Window, which roughly corresponds to a Form, but it can also be some other object such as a Page or FlowDocument that is designed to run inside a container such as a web browser. Chapter 12, “WPF Windows,” describes the Windows class and these other top-level classes, and explains their special roles in WPF applications.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.59.8