如何使用新属性创建自定义texbox控件 [英] how to create custom texbox control with new properties

查看:127
本文介绍了如何使用新属性创建自定义texbox控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想创建一个自定义文本框控件.我想在其中添加所需的归档验证器.当我将isRequired属性设置为"true"时.然后必须输入文本框,反之亦然.

请告诉我如何创建自定义控件...


Indrajeet Sutar

Hi,


I want to create a custom text box control. i want to add required filed validator into that. when i set isRequired property to "true". then the text box must be required and vice-verca.

Please tell me how to create custom control...


Indrajeet Sutar

推荐答案

一种方法是继承文本框控件类,然后在该类中添加字段验证器逻辑.
One way to do this would be to inherit the text box control class and then add your field validator logic in that class.


这篇关于如何使用新属性创建自定义texbox控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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