We're encountering the following exception during the onpaint method of our ultratoolbar: "System.InvalidOperationException: Visual Styles-related operation resulted in an error because visual styles are currently disabled in the client area."
I looked into the other cases where this is happening, but that did not lead to the root cause. This is happening during our scanner, and with a very specific scanner/driver. I'm sure it's causing some issue. We even have it fixed in newer code but are unsure why. We'd rather not have this issue come back on us so this is my last effort to pinpoint the cause and fix.
Why is the toolbar even repainting? Why would anything dealing with the scanner driver cause the toolbar to redraw?
The ribbon buttons are there and are functional. Alternatively, if we pop up a window prior to scanning (which allows for more detail during scanning) and that form has a tool bar as well, it will also break even though the tool bar is only used to change the look of the form. In this case the red x appears in form title area. Also, no amount of redrawing fixes the red x. Once it's there it stays. Why can the toolbar not redraw itself after this issue?
I'm not expecting a fix, but maybe you have some insight for things I could look for.
Hello richard_pruitt
I believe that we have already fixed this behavior and you could try it in your application by downloading the latest service release for NetAdvantage for WinForms 2011 vol1 or NetAdvantage for WinForms 2010 vol3, which should be available at our web site under your account like:
‘My IG’ and select ‘Keys & Downloads’. Select the appropriate tab for this product, then the license key. The available service releases should now be listed on the page.
Please let me know if I can provide any further assistance with this matter.
So are you saying that our options are that we either deal with a red X over the ribbon or we set IsGlassSupported to False so we can have a WinXP look or we set the theme to Win7 Basic when the app starts?
Hello Valentina,
Basically when Application.VisualStyleState is set to something other than ClientAndNonClientAreasEnabled, the VisualStyleRenderer cannot be used to draw glass borders. So what you would have to do is setting IsGlassSupported property of the UltraToolbarsManager to False .
Please let me know if you need any other assistance.
Will Infragistics team solve this issue? Or, maybe, do they suggest any workaround?
Probably the issue can be avoided by changing some setting on Infragistics' controls... but which setting? If you used devexpress, the solution would be disabling ribbon's support for AeroColorScheme... is there a similar property in Infragistics' ribbon?
Thank you, bye. Valentina
Figured it out.
Ultratoolbars does not play nicely with windows 7 aero themes. Using windows 7 basic fixed the issue. Though there is a bug to report with ultratoolbar not playing nicely with aero.