none
AutomationPeer for custom control RRS feed

  • Question

  • Hi, I want to implement an AutomationPeer for custom WPF datagrid control.

    My AutomationPeer class inherits FrameworkElementAutomationPeer and imlements ITableProvider and ISelectionProvider.

    Also it overloads the GetPattern, GetAutomationControlTypeCore and GetClassNameCore methods.

    The main problem I currently have is that ProviderFromPeer always return null. Can any body explain why this can happens?

    Friday, November 30, 2018 12:21 PM

All replies

  • Hi Ruslan F,

    >>The main problem I currently have is that ProviderFromPeer always return null. Can any body explain why this can happens?

    According to your description, we are not sure what cause the issue, could you please share related code and steps to reproduce the issue. 

    Since it is a WPF issue, I'll move the thread to WPF forum for suitable support.

    In addition, here is a sample about Using a Custom AutomationPeer in Cases of UIA Related Performance Degradation.

    https://blogs.msdn.microsoft.com/dsui_team/2013/08/28/using-a-custom-automationpeer-in-cases-of-uia-related-performance-degradation/

    Best regards,

    Zhanglong 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 3, 2018 7:42 AM
    Moderator