开发者

How can I virtualize canvas?

How can I virtualize canvas? When I add just about 1500 items to canvas, it just freezes for a while and then I get the output on the screen. How can I virtualize it's UI so that Canvas only occupies memory for the elements which are on the screen and Ignores all the rest until th开发者_高级运维ey come in the "view"? I want the effect much like VirtualizingStackPanel. VirtualizingStackPanel can handle even 15000 items very nicely.

Thanks in advance:)


You are going to have to derive your own canvas class and override the LayoutUpdated event, removing all children that are not in the visible range, or something to that effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜