After upgrading from WPF 20142.2081 to WPF 20142.2178 SR, which was required to fix memory leaks with the XamComboEditor, we are now experiencing the below error when expanding/collapsing related child records in the XamDataGrid.
Message: The specified Visual is not an ancestor of this Visual.Exception Type: System.InvalidOperationExceptionStack Trace: at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform) at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor) at Infragistics.Windows.DataPresenter.DataRecordPresenter.CalculateCellAreaAutoFitExtent(RecordPresenter rp, Boolean isAutoFitWidth) at Infragistics.Windows.DataPresenter.DataRecordPresenter.UpdateAutoFitPropertiesHelper(RecordPresenter rp) at Infragistics.Windows.DataPresenter.DataRecordPresenter.UpdateAutoFitProperties() at Infragistics.Windows.DataPresenter.RecordPresenter.OnLayoutUpdated() at Infragistics.Windows.DataPresenter.DataPresenterBase.ProcessLayoutUpdatedCallbackList(Object sender, EventArgs e)
I have reviewed and compared the source code for 20142.2178 SR and the following change appears to be the cause of the error:
// AS 2/26/15 TFS185805 // TranslatePoint will translate to the screen and then back down to the target element. Since there // is a scale to 0, the elements will be considered in the same location. // //Point pt = isScaled ? new Point() : cellPanel.TranslatePoint(new Point(0, 0), clipToElement); Point pt = isScaled ? new Point() : cellPanel.TransformToAncestor(clipToElement).Transform(new Point());
Please could you investigate this?
Thanks in advance.
Hello Paul,
Thank you for your post!
I have been looking into your issue and have created a small sample application in order to test the functionality, that you have reported. Using the mentioned sample application I was not able to reproduce the issue.
Would you please modify it with the functionality you are using so the sample shows the issue? This way I would be able to further investigate this matter for you and provide you with more information.
Looking forward to hearing from you.
Gergana,
I appreciate you looking into this issue; unfortunately my team do not have the spare resource to invest time in to producing a working sample of the error.
Please could this be investigated as an issue as obviously from the stack trace, starting from the Control.UpdateLayout() call, there is a problem with the parameter clipToElement that is now being passed into the Visual.TransformToAncestor() method not being an ancestor of cellPanel.
The MSDN documentation (https://msdn.microsoft.com/en-us/library/ms608865%28v=vs.110%29.aspx) on TransformToVisual does actually suggest an alternate method in the remarks section:
// Return the offset vector for the TextBlock object. Vector vector = VisualTreeHelper.GetOffset(myTextBlock); // Convert the vector to a point value. Point currentPoint = new Point(vector.X, vector.Y);
Thank you in advance for your assistance in this matter.
@Rob: is there an ETA for the fix to this bug yet, for we are also waiting on that to be fixed. To double check, I have no access to support case mentioned above?
Thanks
Hi Christian,
Correct, that case above was made for Jonathan so only he can access it from his account. However we are releasing the patch shortly. The patch is currently scheduled for Sept. 25th.
Hi Rob,
we are experiencing the same issue on 2014.2 with the exact same stack trace. Our version is 14.2.20142.2224. Is there already a patch available for this version as well?
Best regards,
Peter
is there any progress on that matter - is it possible to get a patch for 2014.2?
Best Regards
If anyone still stumbles across this thread. I had contact with Infragistics support and the case has long been fixed and released. For the ones using 14.2 - the patch is included in the latest service release with / from version 2283 (2014.2 20142.2283).
Best regards