所有控制属性 [英] all control properties

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

问题描述

大家好,

我想在单独的文件中打印文本框的所有属性.
控件可能会从文本框更改为butoon或listbox或复选框.
因此,我想将所有控件属性打印在单独的文件中.

预先感谢.

Hi all,

I want to print all properties of a textbox in separate file.
control may change to butoon or listbox or checkbox from textbox.
so, I want to print all control properties in separate file.

Thanks in advance.

推荐答案

好,您需要设计一个UI,在该UI中将根据选定的控件显示所有需要的属性.然后,您可以提供此UI的打印功能.



遍历给定控件的所有属性,可能将它们一个接一个地添加到表中,然后打印该表-全部通过内部代码进行.

尝试!
Well, you need to design a UI where all the needed properties will be shown based on selected control. You can give print feature of this UI then.

OR

Loop through all the properties of a given control, probably add one by one to them to a table and then print that table - all by code internally.

Try!


要添加到Sandeep的答案中,您可以使用Reflection自动执行此操作.只需获取所有公共属性及其值即可.
To add to Sandeep''s answer, you can automate this using Reflection. Just fetch all the public properties along with their values.


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

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