locked
WPF Application runs on Windows 7, but not running on Windows 10 RRS feed

  • Question

  • Getting "Recursive call to Automation Peer API is not valid" error from PresentationFramework.dll or PresentationCore.dll when trying to set the SelectedValue or SelectedIndex on ComboBox from code behind. This is working on Windows 7 machines, but error occurs only on Windows 10 machines after installing "Windows 10 cumulative patch v 1.0". Tried to override the automation peer by AutomationPeer OnCreateAutomationPeer() as suggested in some forums. But that did not solve the issue. Target Framework version is .Net Framework 4.5.1, and dev environment is VS 2015.

    Please advice how to fix the above mentioned issue.


    • Edited by chery1 Monday, May 13, 2019 7:28 PM
    Monday, May 13, 2019 7:27 PM

All replies

  • Hi,

    Thank you for posting in Microsoft TechNet Forum.

    Based on your description, please refer to the following methods to troubleshoot:

    1. Try to uninstall the patch and check if the problem was solved.

    2. Try to use the lower or latest version WPFtoolkit to check.

    Meanwhile, please repost it in Windows Presentation Foundation (WPF) Forum again so that more professional people will help you.

    Best regards,

    Hurry


    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    • Proposed as answer by hurry yang Monday, June 3, 2019 9:21 AM
    Tuesday, May 14, 2019 3:28 AM
  • Hi,
    How things are going there on this issue?
    Please let me know if you would like further assistance.

    Best regards,

    Hurry


    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, May 16, 2019 1:10 AM
  • Hi Hurry,

    Thanks for the advice.
    I had uninstalled the Windows 10 patch. But issue persists.
    I had used WPFToolkit version 3.5.50211.1. But the issue persists.

    Following are the dll versions the application uses:
    WPFToolkit.dll 3.5.50211.1
    ExtendedGrid.dll 2.0.0.15
    Exceed.WPF.Toolkit 1.9.0.0
    PresentationCore.dll 4.0.0.0
    PresentationFramework.dll 3.0.0.0

    Application uses ExtnendedGrid to display a list of items. Clicking the hyperlink will bring up another screen with related data. This was working fine in Win 7. But on Win 10 the error occurs. One thing noticed is that, there is a Button control and Text Box outside the grid. This is used for a search for matching records based on the input in the TextBox, and to populate the grid. If this button is clicked, then the hyperlink in the grid works without any issues. I checked the code, but there is nothing different between both the calls. It's quite a puzzle. Please advice of any trouble shooting steps.

    I had already posted the same question in WPF forum, but there is no reply so far.

    Thanks
    Cheriyan Kurian, Toronto, Canada

    Thursday, May 16, 2019 12:22 PM
  • "WPFToolkit.dll 3.5.50211.1"
    you did not read the posting you linked to?
    Thursday, May 16, 2019 2:19 PM
  • I am sorry, I did not get you. Do you mean to say WPFToolkit 3.5.50211.1 is the culprit?
    Thursday, May 16, 2019 3:00 PM
  • OK, you did not directly link, but searching for the keywords lands in

    WPF Recursive call to Automation Peer API is not valid

    with the last post:

    i I also had same problem when I am running Microsoft Test Manager with our WPF application. We were using the WPFtoolkit version v3.5.50211.1, replacing WPF toolkit with lower version v3.5.40619.1 has solved this problem.

    Thursday, May 16, 2019 3:50 PM
  • Hi,

    Thank you for your feedback.

    As I mentioned above: try to use the lower or latest version WPFtoolkit to check. I'm sorry I didn't explain it in detail.

    Maybe the WPFtoolkit version v3.5.50211.1 isn't compatible on win10 now.

    Best regards,

    Hurry


    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, May 17, 2019 6:50 AM
  • Hi Hurry,

    I tried with both v3.5.50211.1 and v3.5.40619.1. But the issue is not resolved.

    By the way, I am not using/referencing WPFToolkit.dll in the window where I use the ExtnendedGrid to display list of items. Is there a higher version of ExtendedGrid.dll 2.0.0.15? If so, from where I can download it.

    Thanks

    Cheriyan

    Friday, May 17, 2019 11:59 AM
  • Hi,

    Thank you for your feedback.

    I'm sorry that I don't find it at the moment. Please try to ask in Windows Presentation Foundation (WPF) Forum so that more professional people will help you.

    Best regards,

    Hurry


    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 20, 2019 9:46 AM