If a XamRibbon has some contextual tabs, and I change the Theme of the ribbon, following exception will occur:
System.InvalidOperationException: The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.
at System.Windows.Media.Visual.TransformToVisual(Visual visual)
at Infragistics.Windows.Ribbon.RibbonCaptionPanel.OnLayoutUpdate(Object sender, EventArgs e) in D:\Infragistics\Ribbon\RibbonCaptionPanel.cs:line 745
Can anybody explain why such a thing happens and Is there any work-around or not?
That must be a first chance exception (i.e. handled) because we have a try catch around the calls to TransformToVisual that would catch an InvalidOperationException that might occur.