Programmatically open context menu using UI automation?
问题 I'm trying to implement a right click context menu using UI automation. Since UI automation does not have a native right click pattern I am adding an ExpandCollapse provider to the listview's AutomationPeer class and mapping the expand and collapse to opening and closing the context menu. My question, is there a better method of invoking the context menu that doesn't involve trying to instantiate a class with a private constructor? I can't use SendKeys with Shift-F10. I'd like to use the