How can I control rendering timing in the application code?


hi,

i'm writing program draws many small shapes (like 10,000 ellipses) on canvas.

the problem takes long time rendering, , shapes become visible of sudden after waiting long time.

(on pc takes around 5-6 seconds draw around 10,000 ellipses.)

it great if increase performance, if it's not possible, @ least i'd display shapes 1 one (or 100 @ time), progressively, user can know drawing in progress.

looking @ msdn document on wpf rendering, states wpf uses "retained mode" system, system controls rendering timing... , in case, chooses draw @ time after taking long time prepare shapes draw...

can control rendering timing in application code display shapes progressively?

my code looks like:

ellipse[] shapes = createshapes(); // creates array of ellipses  for (int = 0; < shapes.length; i++) {      ...      canvas.children.add(shapes[ ]);      // want update display once shape added here... how?      ....  }
in advance help.

the real problem shape performance. instead of ellipse shape class should draw ellipses directly writeablebitmap without overhead of visual tree. writeablebitmapex library provides extension methods draw common shapes incl. drawellipse(). shape sample on project site has demo tenthousands of ellipses drawn in less second.


Silverlight  >  Programming Silverlight with .NET – General



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........