,

Control Type Taxonomy

Having a solid grasp of the class hierarchy of any library that you regularly use helps to improve your productivity and provides a good starting point to gaining a deeper understanding of how a framework is designed to work. It gives you a shortcut for determining what can and cannot be done with a particular type based on its inherited members and whether commonly named members from two different classes are from a shared superclass or have nothing to do with one another. In essence it allows you to better assess what you can achieve using the building blocks and how to avoid making poor design decisions. On that note, this section begins with an overview of the Windows Phone control class hierarchy.

The title of this part of the book is “Essential Elements,” and we begin with the class FrameworkElement. The FrameworkElement provides a set of common APIs for objects that participate in XAML-based layout. FrameworkElement also defines members related to data binding, the visual tree, and object lifetime feature areas. It is also the superclass for most of the types presented in this part of the book (see Figure 5.1).

Image

FIGURE 5.1 Top-level elements of the Windows Phone FCL for XAML apps.

The focus of this chapter is on types that derive from Control (see Figure 5.2), specifically ContentControl, ItemsControl, and RangeBase and their subclasses. The rest are explored in subsequent chapters.

Image

FIGURE 5.2 Control types within the FCL.

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

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