Lost !

-----hard working for the furture.

导航

统计

windows phone 7 之全景视图

全景视图不同于以往的任何一个手机系统的用户界面,不再是让你的内容去适应狭小的手机屏幕,也不再是在不同的窗体之间来回切 换。它提供了一种全新的视图,在水平方向上扩展内容到屏幕之外,来展现/集成不同的控件、数据和服务,就好像把它们排布在一张横轴的画卷上。当前可视区域 所停留的部分,则只是手机屏幕的大小部分,就好像画卷上的一个滑动窗口。用户所需要做的只是轻轻地在界面上横向滑动手指,这张画卷就会随之而动将你想要看 的内容带到你眼前的焦点区域。 

  

   在新建工程里选择Windows Phone Panorama Application即可。

在新建的工程里,可以看到PanoramaBackground.png这个图片,它就是全景视图的背景图了,可以更换这张图来满足自已需要。

<controls:Panorama.Background>

        <ImageBrush ImageSource="Panoramabg.png"/>

    </controls:Panorama.Background>

 

windows <wbr>phone <wbr>7 <wbr>之全景视图

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
 
        <!--Panorama control-->
        <controls:Panorama Title="my application">
            <controls:Panorama.Background>
                <ImageBrush ImageSource="11.jpg"/>
            </controls:Panorama.Background>
 
            <!--Panorama item one-->
            <controls:PanoramaItem Header="first item">
                <!--Double line list with text wrapping-->
                <ListBox Margin="0,0,-12,0" ItemsSource="{Binding Items}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432">
                                <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>
 
            <!--Panorama item two-->
            <!--Use 'Orientation="Horizontal"' to enable a panel that lays out horizontally-->
            <controls:PanoramaItem Header="second item">
                <!--Double line list with image placeholder and text wrapping-->
                <ListBox Margin="0,0,-12,0" ItemsSource="{Binding Items}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                                <!--Replace rectangle with image-->
                                <Rectangle Height="100" Width="100" Fill="#FFE5001b" Margin="12,0,9,0"/>
                                <StackPanel Width="311">                                   
                                    <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                    <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>
           
            <!--Panorama item Three-->
            <controls:PanoramaItem Header="Three Item">

                <Grid Height="500" Width="460" HorizontalAlignment="Left" Name="grid1" VerticalAlignment="Top">
                   
                </Grid>

            </controls:PanoramaItem>
        </controls:Panorama>
  
    </Grid>

 

 

 

也可以动态添加

 

PanoramaItem item = new PanoramaItem();

panorama1.Items.Add(item);

 

http://blog.sina.com.cn/s/blog_4adf31ea0100mfh3.html

posted on   失落''80  阅读(156)  评论(0编辑  收藏  举报

编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
点击右上角即可分享
微信分享提示