简体   繁体   English

Silverlight 3 VirtualizingStackPanel如何工作?

[英]How does the Silverlight 3 VirtualizingStackPanel work?

What are the actual conditions that make the Silverlight 3 VirtualizingStackPanel virtualise its content? 使Silverlight 3 VirtualizingStackPanel虚拟化其内容的实际条件是什么?

For example is it only when elements are off screen regardless of what container it is in or does the VirtualizingStackPanel have to be in a ScrollViewer before it starts applying the virtualisation? 例如,是否仅当元素不在屏幕上时才不管元素位于哪个容器中,还是在开始应用虚拟化之前VirtualizingStackPanel必须位于ScrollViewer中?

I ask this because the MSDN documentation does not give much information, there also seems to be very little useful information on the web and I would like to have a deeper knowledge of how it works! 我之所以这样问是因为MSDN文档没有提供太多信息,网络上似乎也很少有用的信息,我想对它的工作原理有更深入的了解!

Thanks people, 谢谢大家,

Adam 亚当

The idea behind the VirtualizingStackPanel is to allow it to only show items that are visible. VirtualizingStackPanel的思想是允许它仅显示可见的项目。 Its normally used inside another container as its ItemsContainer: 通常在另一个容器中用作ItemsContainer:

<ListBox>
  <ListBox.ItemsContainer>
    <VirtualizingStackPanel />
  </ListBox.ItemsContainer>
</ListBox>

(Which is the default now) (现在是默认值)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM