Can UI Automation be disabled for an entire WPF 4.0 app?

前端 未结 5 1184
死守一世寂寞
死守一世寂寞 2021-01-30 09:47

We are developing a WPF 4.0 application for internal use.
On some clients, we are experiencing huge performance issues due to UI automation (these clients have software i

5条回答
  •  渐次进展
    2021-01-30 09:50

    Have you tried the following things:

    1. Automation code will be triggered only if there are any automation clients ( like screen reader, tabtip in tablet pcs, etc) running in the machine. So one way to get out of this situation is to close any of those automation client apps.

    2. If one is not feasible then an alternative is, UIElementHelper.InvalidateAutomationAncestors will take longer time only if automation tree for the app is sparse ( happens if had disabled building automation tree using custom window automation peer) and visual tree is dense. So another solution is disable any custom automation code and allow WPF to build complete automation tree. This should speed up UIElementHelper.InvalidateAutomationAncestors as well.

    This is what I've found regarding your problem, also they said that they are aware of this issue and will try to fix it.

提交回复
热议问题