在windows phone 中使用panorama

1.在References中添加引用:Microsoft.Phone.Controls

2.在xaml的头部添加:

xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"

3.替换默认的Grid:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
       <controls:Panorama x:Name="PanoramaControl" Title="诺基亚 710">
               <controls:Panorama.Background>
                   <ImageBrush ImageSource="Images/WP_000109.jpg"></ImageBrush>
               </controls:Panorama.Background>
              
               <controls:PanoramaItem Header="怪叔叔">
                   <Grid>
                       <TextBlock Text="一个热心的管理员"></TextBlock>
                   </Grid>
               </controls:PanoramaItem>

               <controls:PanoramaItem Header="no change">
                   <Grid>
                       <TextBlock Text="change 威武"></TextBlock>
                   </Grid>
               </controls:PanoramaItem>

               <controls:PanoramaItem Header="must change">
                   <Grid>
                       <TextBlock Text="change,no change?must change"></TextBlock>
                   </Grid>
               </controls:PanoramaItem>
           </controls:Panorama>
       </Grid>

posted on 2012-08-14 09:54  冰危节奏  阅读(199)  评论(0编辑  收藏  举报

导航