具有自定义类属性的用户控件 [英] Usercontrol with custom class property
本文介绍了具有自定义类属性的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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.
推荐答案
^ ]
第一条链接
创建自定义控件-提供设计时间支持1 [自定义属性和自定义属性编辑器 [
Google[^]
1st Link
Creating Custom Controls-Providing Design Time Support 1[^]
2nd Link
Custom Properties and Custom property Editor[^]
这可能会有所帮助:
http://msdn.microsoft.com/en-us/library/tk67c2t8%28v = VS.100%29.aspx [ ^ ]
Browsable
属性有很多关系-您需要在要显示在属性窗口中的任何属性上.
This may help:
http://msdn.microsoft.com/en-us/library/tk67c2t8%28v=VS.100%29.aspx[^]
A lot hinges on theBrowsable
attribute - you need that on any property you''re going to show in the properties window.
我相信您是否会尝试使用@Nagy的建议Vilmos提供了您将在第一个结果页上找到解决方案的方法.
无论如何,这里是我完全相信您正在寻找的链接:
图像库1.0 [
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
这篇关于具有自定义类属性的用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文