Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
User controls enable you to build a user interface component that leverages one or more existing controls, combining them together to form a single unit. Creating a user control is as simple as adding a new Silverlight User Control item to your project and adding controls to it using the XAML designer (designing it as you would a view). In fact, as you discovered back in Chapter 4, "The Navigation Framework," the MainPage class itself is a user control. It then appears in the Toolbox, where you can drag and drop it into your views as required. You can also define properties and events in its code behind, which can be used by the views that consume the user control.
Let's create a simple user control that includes a label and a text box together as a single component. Add a new item to your project using the Silverlight User Control item template, named FormField.xaml. Lay it out with a Label control and a TextBox control in a Grid, like so: