具有自定义类属性的用户控件

编程入门 行业动态 更新时间:2024-10-11 19:18:01
本文介绍了具有自定义类属性的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Hello Code项目, 我目前正在处理包含MyClass对象列表的用户控件. 此列表应该可以从设计器中编辑. 如何添加对此的支持? 有关该类的一些背景信息. MyClass只有两个属性,分别是Text和Image,我想使它们易于访问. 简而言之,我正在寻找为新类添加设计时支持的解决方案/文章.

Hello Code Project, I''m currently working on a user-control containing a list of MyClass objects. This list should be editable from the designer. How do I add support for it? A bit of background info on the class. MyClass has only two propeties name Text and Image, I would like to make these accessible. In short, I''m looking for a solution/article to add design time support for new classes.

推荐答案

Google [ ^ ] 第一条链接 创建自定义控件-提供设计时间支持1 [ ^ ] 第二个链接 自定义属性和自定义属性编辑器 [ ^ ] Google[^] 1st Link Creating Custom Controls-Providing Design Time Support 1[^] 2nd Link Custom Properties and Custom property Editor[^]

这可能会有所帮助: msdn.microsoft/en-us/library/tk67c2t8%28v = VS.100%29.aspx [ ^ ] Browsable属性有很多关系-您需要在要显示在属性窗口中的任何属性上. This may help: msdn.microsoft/en-us/library/tk67c2t8%28v=VS.100%29.aspx[^] A lot hinges on the Browsable attribute - you need that on any property you''re going to show in the properties window.

我相信您是否会尝试使用@Nagy的建议Vilmos提供了您将在第一个结果页上找到解决方案的方法. 无论如何,这里是我完全相信您正在寻找的链接: 图像库1.0 [ ^ ] 谢谢, Hemant I believe if you would have tried the suggestion @Nagy Vilmos has provided you would have got the solution on first result page. Anyway here is the link which i believe exactly what you are looking for: Image Gallery 1.0[^] Thanks, Hemant

更多推荐

具有自定义类属性的用户控件

本文发布于:2023-11-09 21:17:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573462.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   控件   用户   类属

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!