Well, WPF has nothing to do with GDI and very, very little to do with Windows. It looks like a big step out of Windows, a library with great cross-platform potential. This is very explainable if you remember that Microsoft is working on a non-Windows OS, called "Midory". I really hope the work in direction won't stop.
What you do it the approach structurally closest to GDI, where you do rendering in the application code.
I cannot promise performance improvements, but still advise you to try a completely different method. Use the instance of
System.Windows.Controls.Canvas
to host the UI elements playing the role of the graph nodes, arcs, etc. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas.aspx[
^].
Please also see my past answers on related topics:
Connect different controls[
^],
Vector graphics software like CorelDraw or Inkscape in C# or VB.NET[
^].
I really recommend trying it. WPF is build with high performance in mind, and the optimization you are thinking about on the application level is already thought at higher level of WPF. Тhe problem of flicker is solved as well.
[EDIT]
This is ridiculously simple Canvas tutorial, but it would not help much as this is mere static XAML, but you really need "read" C# programming:
http://wpftutorial.net/Canvas.html[
^].
You really need to add elements programmatically and move them using
SetLeft
,
SetTop
, etc. This is related to
attached properties, but using them does not require you to understand how they work, because you can use the methods like those I've shown above; but they implement attached properties of the children, which you don't have to use. If you really need to understand attached properties (highly recommended for general WPF understanding), please see:
http://msdn.microsoft.com/en-us/library/ms749011.aspx[
^].
See also:
http://www.wpftutorial.net/DependencyProperties.html[
^].
For understanding of aspects of
Canvas
as a parent control, see this overview:
http://msdn.microsoft.com/en-us/library/ms754152.aspx[
^].
For related overview and introductory material, start here:
http://msdn.microsoft.com/en-us/library/ms745058.aspx[
^],
http://msdn.microsoft.com/en-us/library/ms742562.aspx[
^].
For more overviews, please start here:
http://msdn.microsoft.com/en-us/library/ms754130.aspx[
^].
—SA