Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 有没有办法将AutomationElement转换为UIElement?_C#_Wpf_User Interface - Fatal编程技术网

C# 有没有办法将AutomationElement转换为UIElement?

C# 有没有办法将AutomationElement转换为UIElement?,c#,wpf,user-interface,C#,Wpf,User Interface,我对使用WPF编程非常陌生,所以这可能是一个简单的问题。我有一个AutomationElement,希望将其转换为UIElement(甚至是DependencyObject),以便使用 public KeyEventArgs(KeyboardDevice keyboard, PresentationSource inputSource, int timestamp, Key key); 任何帮助都将不胜感激。您希望通过按键事件实现什么?在文本框中输入文本?@Roel谢谢您的提问。我正在尝试将其

我对使用WPF编程非常陌生,所以这可能是一个简单的问题。我有一个AutomationElement,希望将其转换为UIElement(甚至是DependencyObject),以便使用

public KeyEventArgs(KeyboardDevice keyboard, PresentationSource inputSource, int timestamp, Key key);

任何帮助都将不胜感激。

您希望通过按键事件实现什么?在
文本框中输入文本
?@Roel谢谢您的提问。我正在尝试将其发送到web浏览器控件。