I've run into what appears to be a bug in the Box.Highlight() method. I'm trying to draw a chart that shows the change in a value (either positive or negative) between two time periods. The chart is a horizontal BarChart. If the value of the change is positive, the bar should be to the right of a central point and be colored green. If the value of the change is negative, the bar should be to the left of a central point and be colored red.
What appears to be happening is if the value being charted is very close to zero (either negative or positive) the Rectangle being drawn by Box.Highlight() is created with a negative width (because Box.Highlight tries to 'deflate' the rectangle by two pixels.) GDI+ seems unable to draw a rectangle with a negative width (and frankly, how could it?) Because nothing gets drawn, the wrong color shows through on the bars.
If you increase the size of the Form at runtime you will eventually increase the size of the chart so that the rectangle's width is no longer negative. At that point the highlight rectangle is drawn with the correct colors.
I've worked around it by implement my own simple version of Box.Highlight() that eliminates the two pixel 'deflation.'
The bug has now been fixed and the fix will appear in the next hotfix.
i reproduced this issue and entered it into our bug tracking system (#7258). it should be fixed soon and released in an upcoming hotfix. feel free to contact Infragistics Developer Support to check the status of this bug at any time.