I have an random 'Parameter is not valid' Exception in the Toolbar/Ribbon which is not reproduceable for me... The Stacktrace leads from the Ribbon into the FormattedLinkLabel and then into the System.Drawing.Graphics Napespace...
It seems to be the same Problem like reported in here:
http://community.infragistics.com/forums/t/41053.aspx
any ideas?
Thanks for your explanations
Thinking about it further, the issue you're witnessing sounds a lot like a cross-threading issue. If it's occurring completely "at random" then it's most likely the ribbon (or another control) is being accessed from a different thread to the one that it was created on.
We've experienced the issue in the past when the Ribbon was being accessed off the UI thread it was constructed on.
If you're sure that none of your controls are constructed or accessed/touched off the main UI thread, and that you're marshalling calls correctly (not before the Control has been shown/handle has been created for it), then it certainly sounds like a bug...
We've managed to reproduce the error we're seeing in one of the Infragistics samples. On a Vista machine, if you run the "IGProject-UltraGanttView with Office 2010 Style Ribbon" sample from the samples explorer -> Maximise the applciation -> Click the notes tool - displaying a dialog -> Close the dialog -> Restore the application (un-maximise it), the error occurs (every-time!).
The error witnessed here produces the exact same stack trace.
We'll hopefully get round to contacting Infragistics support regarding this, but here's an informal notification of the bug.
As far as a workaround goes, you can try switching off the glass affect for the toolbar by setting the MyUltraToolbarsManager.IsGlassSupported property to false. The error we're witnessing doesn't appear to occur if we set this accordingly. I'm unsure if that will work in your case however, as it seems you have a slightly different variation if it's reproducable on Windows 7 machines.
Richard
The Exception also occurs on Windows 7 x86 and x64.