选择最快的方法来在页面上绘制多个矩形 [英] choosing fastest way to Draw many Rectangle on a Page
本文介绍了选择最快的方法来在页面上绘制多个矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须绘制太多大约20000的矩形.
我经常从数据库表中设置其属性,因为这些属性可能会被用户实时更改.
所以:
作为第一个解决方案,我利用了一个循环,该循环的重复次数与表的计数相同.
当然,这是简单的方法,但解决方案太慢且不合逻辑(我认为).
请告诉我您的解决方案是什么?
有没有更快的解决方案?
i have to draw too many rectangle which are about 20000.
i set their properties from a table of my Database frequently be cause the properties may be changing by users at real time.
So:
as first Solution i utilize a loop which repeat as same as count of my Table.
of course it was Easy way , but it is so slow solution and not logical (i think).
please tell me what''s your solution?
is there faster solution?
推荐答案
渲染为位图并在您的SL应用中显示.
20000是要放入可视化树中的许多矩形.
问候
Espen Harlinn
Render to a bitmap and display that in your SL app.
20000 is a lot of rectangles to put into the visual tree.
Regards
Espen Harlinn
这篇关于选择最快的方法来在页面上绘制多个矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文