通过编码UI访问自定义WPF控件属性 [英] Accessing Custom WPF Control properties through Coded UI

查看:65
本文介绍了通过编码UI访问自定义WPF控件属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果第三方未提供PropertyProvider,如何访问第三方WPF元素的自定义属性? SilkTest具有WPFControl.GetProperty函数,该函数枚举为该对象定义的所有属性. GetProperty

How can one access custom properties of a 3rd party WPF element if the 3rd party did not provide a PropertyProvider? SilkTest has the function WPFControl.GetProperty which enumerates over all of the properties defined for the object in question. The GetProperty function for WpfContrl in the UITesting namespace only seems to provide access to the generic properties.

推荐答案

Hi 只能在UITesting命名空间中的WpfContrl函数中提供对通用属性的访问.博格创,

Hi  bogertron,

我搜索了有关访问自定义或第三方WinForms自定义控件"的相关文档.

I searched out the related document about "Accessing Custom or Third party WinForms custom controls ".

我认为WPF控件类似于Windows窗体控件.您可以参考以下链接:

And I think the WPF control is similar to the Windows form control. You could refer to the following links:

https://blogs.msdn.microsoft.com/mathew_aniyan/2011/05/17/enabling-ui-testing-for-third-party-winforms-custom-controls-1/

https://blogs.msdn.microsoft.com/mathew_aniyan/2011/05/17/enabling-ui-testing-for-third-party-winforms-custom-controls-2/

希望对您有帮助.

最好的问候,

肖湖


这篇关于通过编码UI访问自定义WPF控件属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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