i have just upgraded my computer to a Sony all in one PC and i have installed all the software i use,, but when it comes to running my application which uses infragistics controls via deployment and via Debugging environment the app crashes as soon as it has to load data into a XamDataGrid with the following error:
Argument Exception was unhandled
Item has already been added. Key in dictionary: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer' Key being added: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer'
I have tried tracking down the error but to no avail so any assistance will be greatly appreciated.
The Computer is running Windows 7 Professional 64bit and im using NetAdvantage WPF 2010.3
We are not in a position right now to upgrade to a newer release based on the QA resources that we have to cover the testing needed. So, is there something that we can do on our end to fix this issue without upgrading? Or, I think we have XamDataGrid's source code, so can you tell me what changes to make in the source code to fix this bug?
Andrew, Can you provide us the event that the problem is generated from? We would like to suppress the exception in that event,
There is no specific event that is related. Essentially the problem in the AutomationPeer was always there but because MS wasn't caching the peer state it didn't result in an issue but when MS made a change recently and fixed the caching it caused this issue to surface. In our code the issue was fixed by making a change in the AutomationPeerProxy's GetChildrenCore implementation. Specifically to have it create a new List<AutomationPeer> constructed using the result of the call to peer.GetChildren.
Thanks for the reply Andrew. As we posted already, we are not in a position to upgrade to latest infragistics version because of wide reaction in our product. This issue is particualrly observed when application is running in recording tools like Morae.
We have a scenario where IG grid is added as WPF Combobox item used for lookup . This cutom control is been used widely in our product in key places.The above exception is seen when we try to scroll or select the records in the combo box item grid while the recording tool is running. Our usability study team is unable to proceed further because of this issue.
If you can help us to point any particular event like ItemSelected or RecordsInViewChanged where we can handle above exception and allow application to continue that would be great.
The recording tool is probably using ui automation or is an accessibility client and that is causing the automation classes to get loaded in your application and that ultimately is leading to the issue becauseof the problem that I mentioned. I really cannot point to any single event since we are not directly triggering it. I don't know exactly what your callstack looks like but the ones I have seen including calls to UpdateLayout whether that was from the WPF framework directly or any call to UpdateLayout.