[UWP]自定义虚拟化面板 [英] [UWP] Custom virtualization panel

查看:85
本文介绍了[UWP]自定义虚拟化面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我需要开发自定义虚拟化面板。我有一个不同高度的项目列表,所以我选择`Canvas`就像`Panel`。

我看了几篇关于虚拟化的文章但是我找不到任何对UWP有用的东西平台(很多WPF实现与`ItemContainerGenertor`使用)。 

我已经基于`Canvas`制作了自定义面板但我不了解我应该如何进行自定义虚拟化: ( 
$
我应该检查面板中的滚动位置并通过`ItemContainerGenerator删除 - 添加项目,或者我应该在基于GridView的类中实现它还是实现一些接口? 

Hi!
I need to develop custom virtualization panel. I have a list of items with different height so I choose `Canvas` like a `Panel`.
I looked at a couple of articles about virtualization but I didn't find anything useful for UWP platform (a lot of WPF implementation with `ItemContainerGenertor` using). 
I have already made custom panel based on `Canvas` but I don't understand how I should make custom virtualization :( 
Should I check scroll position in the panel and remove-add items by `ItemContainerGenerator` or I should make it in `GridView` based class or implement some an interface? 

推荐答案

这是一个类似的帖子:

Here is a similar post:

https://stackoverflow.com/questions/36819968/implement-ui-virtualization-in-custom-itemspanel/ 36855907?noredirect = 1#comment79530435_36855907

在评论中,海报给出了一个示例项目,您可以参考它。这似乎很多工作。

And in the comment, the poster give a sample project, you can reference it. It seems a lot of work.


这篇关于[UWP]自定义虚拟化面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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