温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:HeroBeastControls的NavMenu导航控件Demo及源码
当前文件路径:HeroBeastControlsNavMenu/NavMenu/Editor/NavMenuItemEditor.cs

1using System; 2
using System.ComponentModel; 3
using System.ComponentModel.Design; 4
using System.Reflection; 5
using System.Web.UI.HtmlControls; 6
7
namespace HeroBeastControls.NavMenu 8
{ 9
/// <summary> 10
/// 可以实现集合属性的,界面编辑器 11
/// </summary> 12
public class NavMenuItemEditor : CollectionEditor 13
{ 14
public NavMenuItemEditor(Type type) 15
: base(type) 16
{ 17
} 18
//一次可否选择多项 19
protected override bool CanSelectMultipleInstances() 20
{ 21
return false; 22
} 23
24
//获取此集合包含的数据类型 25
protected override Type CreateCollectionItemType() 26
{ 27
return typeof(NavMenuItem); 28
} 29
} 30
} 31





}