The controls provided by Phone7 are basic controls that are far from satisfying development needs, and this user control is used to customize the controls needed. For example: The TreeView, waiting and so on are not in Phone7. In addition this is also the place with Silverlight, in Silverlight, all pages are inherited from UserControl, and Phone7 pages are inherited from PhoneApplicationPage.
Let's make a simple waitingbox with animation:
1. Create: UserControl inherits the UserControl control class, which means that the control has all the properties and methods, and that it needs to be extended since it is needed.
2. Sample XAML:
<Popup x:Name="WaitingWnd" IsOpen="False">
<Grid x:Name="LayoutRoot" Background="Transparent">
<TextBlock Height="44" HorizontalAlignment="Left" Margin="0,144,0,0" Name="textBlock1" Text="请等待….." VerticalAlignment="Top" Foreground="Gray" Width="200" FontSize="32" TextAlignment="Center"/>
<Image Height="150" HorizontalAlignment="Left" Margin="22,6,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="150" />
</Grid>
</Popup>