VirtualQueryableCollectionView

When working with the UI components that enable UI Virtualization, you may take advantage of the above mentioned technique by usingVirtualQueryableCollectionView class. It enables you to benefit from the on-demand data loading to smooth scrolling with UI virtual components. 
The VirtualQueryableCollectionView provides you with the following important members:

    • LoadSize property - defines the maximum number of items requested at once;

    • VirtualItemCount property – defines the total number of items available on the server-side;

    • ItemsLoading event – will be raised when the collection is requesting item at some index and this item is not already loaded. The arguments in this event are as follows:

    • StartIndex – requested item index;

    • ItemCount - number of requested items (can be less than or equal to the LoadSize).

public MainWindow()
{
InitializeComponent();
var context = new NorthwindEntities();
var query = context.Order_Details.OrderBy(o => o.OrderID);
var view = new VirtualQueryableCollectionView(query) { LoadSize = };
DataContext = view;
}

另外一种写法;

 public MainPage()
{
InitializeComponent(); var context = new NorthwindDomainContext();
var query = context.GetOrder_DetailsQuery().OrderBy(o => o.OrderID);
query.IncludeTotalCount = true; var view = new VirtualQueryableCollectionView() { LoadSize = , VirtualItemCount = };
view.ItemsLoading += (s, e) =>
{
context.Load<Order_Detail>(query.Skip(e.StartIndex).Take(e.ItemCount)).Completed += (sender, args) =>
{
var lo = (LoadOperation)sender;
if (lo.TotalEntityCount != - && lo.TotalEntityCount != view.VirtualItemCount)
{
view.VirtualItemCount = lo.TotalEntityCount;
} view.Load(e.StartIndex, lo.Entities);
};
}; DataContext = view;
}

【2016-10-25】【坚持学习】【Day12】【WPF】【Telerik】【VirtualtionData 虚拟化数据】的更多相关文章

  1. < 独立项目 - 文本挖掘 > - 2016/10/25 第一更 - <Linux相关知识准备>

    < 独立项目 -  文本挖掘 > 项目立项的相关背景介绍,TODO方向. 一.Ubuntu环境配置 主机系统:Windows 7 SP1  64位操作系统 | i5-4210 CPU | ...

  2. 2016.10.30 济南学习 Day2 下午 T1

    他 [问题描述] 一张长度为N的纸带,我们可以从左至右编号为0 − N(纸带最左端标号为 0).现在有M次操作,每次将纸带沿着某个位置进行折叠,问所有操作之后纸带 的长度是多少. [输入格式] 第一行 ...

  3. My latest news (--2016.10)

    2016.10.31 22:44 一个“程序”,打代码占40%.思考占60% 2016.10.30 20:53 周末,话说今天有晚上讲座,还点名,了,悲催.之前学习的Qt有点问题,悲催.推荐个博文:h ...

  4. 成为Java高手的25个学习目标

    本文将告诉你学习Java需要达到的25个目标,希望能够对你的学习及找工作有所帮助.对比一下自己,你已经掌握了这25条中的多少 条了呢? 1.你需要精通面向对象分析与设计(OOA/OOD).涉及模式(G ...

  5. 成为Java高手的25个学习要点

    成为Java高手的25个学习要点 想成为Java大牛吗?不妨来学习这25个要点. 1. 你需要精通面向对象分析与设计(OOA/OOD).涉及模式(GOF,J2EEDP)以及综合模式.你应该了解UML, ...

  6. 2016 10 28考试 dp 乱搞 树状数组

    2016 10 28 考试 时间 7:50 AM to 11:15 AM 下载链接: 试题 考试包 这次考试对自己的表现非常不满意!! T1看出来是dp题目,但是在考试过程中并没有推出转移方程,考虑了 ...

  7. 想成为Java高手的25个学习目标

    本文将告诉你学习Java需要达到的25个目标,希望能够对你的学习及找工作有所帮助.对比一下自己,你已经掌握了这25条中的多少条了呢? 1.你需要精通面向对象分析与设计(OOA/OOD).涉及模式(GO ...

  8. 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command)

    [源码下载] 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command) 作者:webabcd 介绍背水一战 Windows 10 之 MVV ...

  9. /proc/interrupts 统计2.6.38.8与3.10.25差异

    eth4进,eth5出 linux-3.10.25 67:          2          3          2          3   PCI-MSI-edge     eth468: ...

随机推荐

  1. 分页控件layui的使用

    $.getJSON( )的使用方法简介 $.getJSON( url [, data ] [, success(data, textStatus, jqXHR) ] ) url是必选参数,表示json ...

  2. HTML5 Canvas彩色小球碰撞运动特效

    脚本简介 HTML5 Canvas彩色小球碰撞运动特效是一款基于canvas加面向对象制作的运动小球动画特效.   效果展示 http://hovertree.com/texiao/html5/39/ ...

  3. 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command)

    [源码下载] 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command) 作者:webabcd 介绍背水一战 Windows 10 之 MVV ...

  4. discuz X3.1 源代码阅读,记录代码片段

    require_once libfile('function/post'); // /source/function/function_post.php require_once libfile('p ...

  5. centos mysql php Curl

    开放80端口 #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT  #/sbin/iptables -I INPUT -p tcp --dport ...

  6. Logging configuration

    The Play logger is built on Log4j. Since most Java libraries use Log4j or a wrapper able to use Log4 ...

  7. iOS之自动调节输入文本框的高度

    //自动调节输入文本框的高度 - (void)textViewDidChange:(UITableView *)textView{ float height; if ([[[UIDevice curr ...

  8. iOS通讯录整合,兼容iOS789写法,附demo

    苹果的通讯录功能在iOS7,iOS8,iOS9 都有着一定的不同,iOS7和8用的是 <AddressBookUI/AddressBookUI.h> ,但是两个系统版本的代理方法有一些变化 ...

  9. 用SourceTree合并工程冲突,工程打不开时的操作

    1.右键工程 --> 显示包内容 2.打开project.pbxproj文件 3.command + F :搜索“<<<<<” 或“>>>> ...

  10. Android 源码解析之AsyncTask

    AsyncTask相信大家都不陌生,它是为了简化异步请求.更新UI操作而诞生的.使用它不仅可以完成我们的网络耗时操作,而且还可以在完成耗时操作后直接的更新我们所需要的UI组件.这使得它在android ...