concept UserControl in category silverlight

This is an excerpt from Manning's book Silverlight 5 in Action.
Certain types of objects may contain one or more other nested objects. For example, a button may contain a single content object, which itself may contain one or more other objects. In listing 2.1, the UserControl contains the Grid, the Grid contains the Button, and the Button contains a StackPanel, which is a panel that by default lays its children out in a vertical list. The StackPanel itself contains three TextBlock elements.
The UserControl and Button are both content controls, a concept I’ll discuss in greater detail in chapter 12. For now, it’s important to understand that a content control may only have one direct child element, typically a panel (StackPanel, Grid, Canvas, etc.) that holds other elements. The x:Name and x:Class properties are part of the namespace specified by the xmlns:x statement. More on that in a moment ... The Grid and StackPanel are both Panels, which is a type that has a Children collection to allow multiple contained elements. I’ll discuss panels in detail in chapter 8.
Toward the end of this chapter, you’ll also take your first trip into creating controls of your own. In this case, you’ll follow the simple reuse model: the UserControl. I covered the UIElement and FrameworkElement in chapter 7, so let’s continue our walk up the stack and take a look at the base Control type.

This is an excerpt from Manning's book Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services.
The UserControl and Button are both content controls, a concept we’ll discuss in greater detail in chapter 10. For now, it’s important to understand that a content control may only have one direct child element, typically a panel that holds other elements. The x:Name and x:Class properties are part of the namespace specified by the xmlns:x statement. More on that in a moment... The Grid and StackPanel are both Panels, which is a type that has a Children collection to allow multiple contained elements. We’ll discuss panels in chapter 7.
Toward the end of this chapter, we’ll also take our first trip into creating controls of our own. In this case, we’ll follow the simple reuse model: the UserControl. In chapter 24—once we’ve covered binding, resources, styles, and templates—we’ll again revisit creating controls, but with a more robust custom control model.
Listing 10.12. The user interface for the LockableTextBox UserControl
<UserControl x:Class="MyClassLibrary.LockableTextBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"> <StackPanel x:Name="LayoutRoot" Orientation="Horizontal"> <TextBox x:Name="myTextBox" Height="24" Width="120" /> <Image x:Name="myImage" Height="24" Margin="5,0,0,0" Cursor="Hand" MouseLeftButtonUp="myImage_MouseLeftButtonUp" Source="http://www.silverlightinaction.com/unlocked.png" /> </StackPanel> </UserControl>