PropertyGrid

therry_ding 2014-05-05 01:29:13
C#中,如何使PropertyGrid同时支持编辑和弹出对话框功能,像VS2008中字体属性那样的功能?
...全文
144 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
therry_ding 2014-05-05
  • 打赏
  • 举报
回复
这里是截图
therry_ding 2014-05-05
  • 打赏
  • 举报
回复
不知道7楼看了哪里的代码,能否贴出来看看?我自己动手写了一个属性,如果同时使用的话只有一个起作用 [CategoryAttribute("基本设置"),EditorAttribute(typeof(TextCaptionEditoer), typeof(UITypeEditor)),TypeConverterAttribute(typeof(CBDate))] public string HeaderCaption { get { return caption; } set { caption = value; } }
superliu1122 2014-05-05
  • 打赏
  • 举报
回复
引用 6 楼 therry_ding 的回复:
能否说明白点儿,因为要弹出对话框,所以我目前实现了EditorAttribute,但是一旦实现了EditorAttribute,就不能同时绑定TypeConverter,而且相应的那条属性页不能编辑了,我的目的是实现编辑且能弹出对话框。
谁说的用了Editor就不能用TypeConverter 你去看看Font的代码,她就同时用了这两个
therry_ding 2014-05-05
  • 打赏
  • 举报
回复
能否说明白点儿,因为要弹出对话框,所以我目前实现了EditorAttribute,但是一旦实现了EditorAttribute,就不能同时绑定TypeConverter,而且相应的那条属性页不能编辑了,我的目的是实现编辑且能弹出对话框。
threenewbee 2014-05-05
  • 打赏
  • 举报
回复
默认就支持,不过你需要给你的属性实现TypeConverter
therry_ding 2014-05-05
  • 打赏
  • 举报
回复
你妹的,做广告的也来了。
therry_ding 2014-05-05
  • 打赏
  • 举报
回复
感谢,这个我看过了,不过达不到我的要求。
wind_cloud2011 2014-05-05
  • 打赏
  • 举报
回复
http://blog.csdn.net/xoyojank/article/details/4322167

110,545

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧