Dec 6, 2012 at 7:27 AM
Edited Dec 6, 2012 at 7:46 AM
It's a bug in the NodeXLControl that I never noticed before. It occurs only in WPF applications. It does
not occur in Windows Forms applications in which the NodeXLControl is hosted within an ElementHost control. Our own application that uses the control is Windows Forms-based.
I've recorded the bug, but I'm not sure when I'll have the time to track it down and fix it. I have two suggestions:
1. I can get the CopyGraphToBitmap() method to work fine in a WPF application by hosting the NodeXLControl inside an ElementHost, which in turn is hosted inside a WindowsFormsHost. So the control hierarchy is Window -> WindowsFormsHost -> ElementHost
-> NodeXLControl. Nutty and convoluted, but it worked. I don't know if this would have side effects in your application, though.
2. If you're feeling ambitious, you could download the source code and track down the bug yourself by stepping through the CopyGraphToBitmap() method. If you come up with a fix, or even just an explanation of why the method creates black bands when
the control is not hosted in an ElementHost, we would love to incorporate it and give you full credit.
In any case, thanks for reporting the bug.