`

WP7 学习之pivot控件应用

    博客分类:
  • WP7
 
阅读更多

Pivot控件用来过滤大量的数据集,在不同的视图中查看它们,或者针对同一个数据切换不同的视图。Pivot控件跟Tab控件很像,但它是专门为Windows Phone和触控界面设计的。它通过视图间的横向互相切换,这样就可以让用户 用内置的触控功能来回导航。

在Windows Phone内置的功能中,E-Mail和Calendar功能就是Pivot的一个应用。

 

<controls:Pivot Title="my test">
<controls:PivotItem Header="周一计划">
<ListBox FontSize="30">
<ListBoxItem Content="oooooooooooo"></ListBoxItem>
<ListBoxItem Content="nnnnnnnnnnnn"></ListBoxItem>
<ListBoxItem Content="eeeeeeeeeeee"></ListBoxItem>
</ListBox>
</controls:PivotItem>

<controls:PivotItem Header="周二计划">
<ListBox FontSize="30" >
<ListBoxItem Content="tttttttttttt"></ListBoxItem>
<ListBoxItem Content="wwwwwwwwwwww"></ListBoxItem>
<ListBoxItem Content="oooooooooooo"></ListBoxItem>
</ListBox>
</controls:PivotItem>

<controls:PivotItem Header="周三计划">
<ListBox FontSize="30">
<ListBoxItem Content="hhhhhhhhhh"></ListBoxItem>
<ListBoxItem Content="rrrrrrrrrr"></ListBoxItem>
<ListBoxItem Content="eeeeeeeeeee"></ListBoxItem>
</ListBox>
</controls:PivotItem>
</controls:Pivot>

考虑到性能,尽量降低PivotItem的个数。

 

尽量实时加载里面的内容,而不是在程序开始的时候就全部加载。

 

尽量用Pivot控件显示相同类型的元素或者数据。

 

不要用Pivot控件实现类似导航工具的功能。

 

不要使用Application Bar提供导航。如果用Pivot是为了导航效果,那就相当于滥用了。

 

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics