【2016-10-25】【坚持学习】【Day12】【WPF】【Telerik】【VirtualtionData 虚拟化数据】
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 虚拟化数据】的更多相关文章
- < 独立项目 - 文本挖掘 > - 2016/10/25 第一更 - <Linux相关知识准备>
< 独立项目 - 文本挖掘 > 项目立项的相关背景介绍,TODO方向. 一.Ubuntu环境配置 主机系统:Windows 7 SP1 64位操作系统 | i5-4210 CPU | ...
- 2016.10.30 济南学习 Day2 下午 T1
他 [问题描述] 一张长度为N的纸带,我们可以从左至右编号为0 − N(纸带最左端标号为 0).现在有M次操作,每次将纸带沿着某个位置进行折叠,问所有操作之后纸带 的长度是多少. [输入格式] 第一行 ...
- My latest news (--2016.10)
2016.10.31 22:44 一个“程序”,打代码占40%.思考占60% 2016.10.30 20:53 周末,话说今天有晚上讲座,还点名,了,悲催.之前学习的Qt有点问题,悲催.推荐个博文:h ...
- 成为Java高手的25个学习目标
本文将告诉你学习Java需要达到的25个目标,希望能够对你的学习及找工作有所帮助.对比一下自己,你已经掌握了这25条中的多少 条了呢? 1.你需要精通面向对象分析与设计(OOA/OOD).涉及模式(G ...
- 成为Java高手的25个学习要点
成为Java高手的25个学习要点 想成为Java大牛吗?不妨来学习这25个要点. 1. 你需要精通面向对象分析与设计(OOA/OOD).涉及模式(GOF,J2EEDP)以及综合模式.你应该了解UML, ...
- 2016 10 28考试 dp 乱搞 树状数组
2016 10 28 考试 时间 7:50 AM to 11:15 AM 下载链接: 试题 考试包 这次考试对自己的表现非常不满意!! T1看出来是dp题目,但是在考试过程中并没有推出转移方程,考虑了 ...
- 想成为Java高手的25个学习目标
本文将告诉你学习Java需要达到的25个目标,希望能够对你的学习及找工作有所帮助.对比一下自己,你已经掌握了这25条中的多少条了呢? 1.你需要精通面向对象分析与设计(OOA/OOD).涉及模式(GO ...
- 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command)
[源码下载] 背水一战 Windows 10 (25) - MVVM: 通过 x:Bind 实现 MVVM(不用 Command) 作者:webabcd 介绍背水一战 Windows 10 之 MVV ...
- /proc/interrupts 统计2.6.38.8与3.10.25差异
eth4进,eth5出 linux-3.10.25 67: 2 3 2 3 PCI-MSI-edge eth468: ...
随机推荐
- EC笔记:第三部分:13、以对象管理资源
C++相比Java等含有gc的语言来说,内存管理方面(也包括资源管理)比较令人头疼.一些初级程序员,甚至是一些经验丰富的老程序员,也会经常在资源管理上犯错.这时候就需要一个能够自动管理资源的东西(gc ...
- What does "size" in int(size) of MySQL mean?
What does "size" in int(size) of MySQL mean? https://alexander.kirk.at/2007/08/24/what-doe ...
- thinkcmf 常用操作
11-16 thinkcmf 核心文件结构:simplewind--model--lite--model.class.php /controller.class.php Mobile---contr ...
- SharePoint 2013 图文开发系列之应用程序页
在SharePoint中,有两种页面类型,一种是保存在数据库中的页面,我们可以在网站的页面库中看到:还有一种叫做应用程序页,部署在服务器上,Layouts下面的页面,是应用程序页,主要是完成特定功能的 ...
- Oracle分页函数(存储过程)
create or replace package body Get_RecordByPage is StrSQL ); --分页函数 procedure GetRecordByPage(tblNam ...
- MyEclipse 2016 CI 4新增BootStrap模板
Live Preview with CodeLive 目前CodeLive还只有Live Preview这一个功能,在后续的版本中会陆续添加新功能. 新增Bootstrap模板 在模板面板中选择相应的 ...
- iOS之处理不等高TableViewCell的几种方法
课题一:如何计算Cell高度 方案一:直接法(面向对象) 直接法,就是把数据布局到Cell上,然后拿到Cell最底部控件的MaxY值. 第一步:创建Cell并正确设置约束,使文字区域高度能够根据文字内 ...
- OC的runtime运行机制
什么是runtime runtime就是一套底层的c语言API(Application Programming Interface)里面包括很多强大实用的c语言类型.c语言函数. 实际上,平时我们编写 ...
- Python聊天室
小编心语:锵锵锵!各位看官注意了啊,走过路过表错过!上篇博文主要介绍了基于基于Server-Sent Event的简单在线聊天室,相信不管各位是大牛.小牛还是跟小编一样的小白,可能觉得看得不够过瘾,区 ...
- (二)Maven的安装与环境配置
想要安装 Apache Maven在Windows 系统上, 需要下载 Maven 的 zip 文件,并将其解压到你想安装的目录,并配置 Windows 环境变量. 所需工具 : 1.JDK 2.Ma ...