从ElementHost获得控制 [英] Get control from ElementHost

查看:100
本文介绍了从ElementHost获得控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何从元素主机获得控制权吗?
每个元素主机都包含来自WPF的漂亮文本框,按下键时我要下一个文本框具有焦点?

任何想法..

Does anyone know how to get control from element host?
Each element host contain nice text box from WPF, on key down I want to next text box have focus?

Any idea..

推荐答案

尝试一下:

0)从控件的Parent属性中获取父容器

1)从父母的子女"财产中获得子女的集合

2)找到当前已获得关注的儿童控件的集合

3)将焦点放在子元素集合中的下一个子元素上.
Try this:

0) Get the parent container from the control''s Parent property

1) Get the collection of children from the parent''s Children property

2) Find the control int he children collection that''s currently got the focus

3) Set the focus on the next child in the children collection.


这篇关于从ElementHost获得控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆