The RIbbon of the UltraToolBarsManager "rebuilds" controls somehow when reconnecting to a remote desktop session.
I have a form with a ToolBarsManager (no matter if panel or not).I have a Textcontrol with some formatted text, tables, whatever.No properties set except ultraToolBarsManager1.Ribbon.Visible=true (without it, everything is ok).
I disconnect from the RDS Session, I reconnect.
Everything is the same except for the contents of the Textcontrol which is replaced by plain text.The pro's at TX Textcontrol say, that this can only happen, because the ToolBarsManager reconstructs the controls and "sees" only the Text-property which contains only the plain text - no formatting, no tables, no fields, ....They suggest using their Ribbon, which we would do if we didn't have an ERP system with thousands of sourcefiles using lots of Infragistics controls.
What solution do you suggest?Waiting for a bug fix?
Please try setting UltraToolbarsManager1.IsGlassSupported = False
When the remote desktop session is closed, the OS stops the Themes service which notifies our controls that the themes on the OS have changed. This causes us to recreate the parenting form handle, and thus encounter a .NET bug that has been known to us for a very long time.
Many issues, similar to this, have been reported in the past from this bug in .NET occurring and we've always recommended to set IsGlassSupported to False. Whenever a form's Handle is recreated, it no longer honors window states correctly. Due to our ability to render the form borders with Glass (on OSs that support glass), we are forced to recreate the form's handle if theme has changed. Otherwise, the form borders will be rendered as a giant black box.,
The proposed solution in situations like this is to turn off glass on the UltraToolbarsManager.
It seems there is no good way to recognize the application is running in a remote window and know that the ThemeChanged message is due to logging out of the remote connection, without breaking existing behaviors.
Let me know if you have any questions.
Michael Di FilippoAssociate Software DeveloperInfragistics, Inc.www.infragistics.com/support
That did it!
I didn't get all your explanations though:
Michael DiFilippo said:it no longer honors window states correctly
Are there any side effects to be expected?In what circumstances will anything not be handled correctly (visible "damage" for the end user)?
And concerning "No good way to recognize .. ":Is Microsoft.Win32.SystemEvents:SessionSwitch not useable?(I had started trying to implement a work around with it, but your answer stopped me from finishing)
We never tested SessionSwitch etc.
Basically the OS no longer renders things correctly and is a fault in DotNet that we can't fix. There aren't any side effects of not using Glass.
Thanks a lot for all the information, Michael