Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Feedback: 0 Comments on this Section

Control Type Taxonomy

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 Silverlight 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 Silverlight layout. FrameworkElement also defines members related to data binding, the visual tree, and object lifetime feature areas in Silverlight. It is also the superclass for most of the types presented in this part of the book (see Figure 5.1). Figure 5.1. Top level elements of the Silverlight for Windows Phone FCL 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. Figure 5.2. Control types within the FCL Identifying Controls Not Supported or Absent in Silverlight for Windows Phone Some controls that are present in Silverlight for Windows Phone are not shown in the Visual Studio Toolbox or are not recommended for use due to platform differences or design constraints. These platform differences are mostly related to the phone’s touch driven UI and reduced display size. In addition, the following Silverlight 4 controls do not exist in the Silverlight for Windows Phone FCL: • DataGrid • DatePicker (present in the Silverlight for Windows Phone Toolkit) • OpenFileDialog • SaveFileDialog • Label • GridSplitter • TabControl • TreeView Some controls exist but are not supported. The following controls should not be used directly: • Calendar • Frame—Use the PhoneApplicationFrame instead. • Page—Use the PhoneApplicationPage instead. • ScrollBar—Used by the ScrollViewer.

You are currently reading a free preview of this book.


Sign up for a
Safari Library subscription
to access Rough Cuts.


Subscribe Now