Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double buffering in WPF?

Tags:

wpf

gdi

I'm developing a graph control in WPF. I have previously developed it using GDI and C#. i've used double buffering in previous control to avoid some issues related to redrawing of the graph control. Now when i've developed the Graph Control in WPF i have a problem, when i use my Graph Control as a user control in a windows form,anchoring it to the form,and when running it and resizing it i can clearly see two black lines horizontal one and a vertical one in the right and bottom corners of the graph control... i think when i am resizing the graph, to occupy the resized area graph control is taking time and in the mean time the area not filled by the control is seen black...

is there any solution to this problem in WPF? like double buffering?

how can i avoid this issue??

regards, rangana.

like image 597
Rangana Sampath Avatar asked Nov 04 '09 09:11

Rangana Sampath


1 Answers

WPF uses DirectX for rendering, so you don't need to doubleBuffer. Perhaps the problem is in your layout code.

like image 134
luvieere Avatar answered Sep 21 '22 08:09

luvieere