Hi
I have a chart component that displays bunch of rectangle with gradient brush. The speed is fine until the chart has under 1000 rectangle, after that speed slows down drastically.
However, I used some timers and found out that the My painting procedure that arranges the rectangle works pretty fast, like 10-50ms, but after function funishes the whole app freezes for 800-1000ms and only then shows rectangles in new position. (100% that I don't have any other calls, I putted Debug.WriteLine in all functions, so I can see the stack of functions calls).
By this I assume, that after I set coordinates for all rectangles, the WPF system does something additionally to them, I have no idea what, maybe some layout calls or whatever, so I am wondering maybe there is a flag to switch it off to tell WPF system do not take care of my rectangles, cause I place them where is needed and reposition on Canvase Resize. (All my rectangle are on Canvas, so no layout system is used directly)
Are there any fucntions like BeginUpdate / EndUpdate for WPF.Canvas we use with ListView and such in WinForms?
Any ideas about this much appreciated?
Thx
I have a chart component that displays bunch of rectangle with gradient brush. The speed is fine until the chart has under 1000 rectangle, after that speed slows down drastically.
However, I used some timers and found out that the My painting procedure that arranges the rectangle works pretty fast, like 10-50ms, but after function funishes the whole app freezes for 800-1000ms and only then shows rectangles in new position. (100% that I don't have any other calls, I putted Debug.WriteLine in all functions, so I can see the stack of functions calls).
By this I assume, that after I set coordinates for all rectangles, the WPF system does something additionally to them, I have no idea what, maybe some layout calls or whatever, so I am wondering maybe there is a flag to switch it off to tell WPF system do not take care of my rectangles, cause I place them where is needed and reposition on Canvase Resize. (All my rectangle are on Canvas, so no layout system is used directly)
Are there any fucntions like BeginUpdate / EndUpdate for WPF.Canvas we use with ListView and such in WinForms?
Any ideas about this much appreciated?
Thx