LoadingPivotItem和SelectionChanged的区别 [英] Difference in LoadingPivotItem and SelectionChanged

查看:41
本文介绍了LoadingPivotItem和SelectionChanged的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Pivot中有四个PivotItem。我在视图中加载每个数据透视表中的数据。我正在使用Pivot.SelectionChanged事件,如下所示:

I have four PivotItems in a Pivot. I'm loading data in each PivotItem when it comes to view. I'm using the Pivot.SelectionChanged event, like so:

private void PivotSelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch(mypivot.SelectedIndex)
{
case 0:
//load items for PivotItem 0
.......
.......
}
}  

但是,我发现还有一个LoadingPivotItem事件,可以类似的方式使用。

这两种方法有什么区别?一个比其他更有效吗?

However, I see that there is also a LoadingPivotItem event, that can be used in similar way.
What is difference between these two methods? Is one more efficient than other?

推荐答案

仅在需要时才加载数据透视表。但是,一旦加载,您可以继续更改所选的枢轴 
Pivots are only loaded when required. However, once loaded you can continue changing the selected pivot 


这篇关于LoadingPivotItem和SelectionChanged的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆