0
Visual Studio 편집기의 드롭 다운 목록을 통해 DataSource 필드를 편집 할 수있는 [AttributeProvider (typeof (IListSource))] 태그가 있습니다. 동일한 태그를 사용하여 동일한 방식으로 DataMember 속성을 편집 할 수 있습니다. 지금 내가 사용하는 결국Visual Studio 디자이너에서 사용자 정의 컨트롤의 데이터 멤버
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
get
{
return this.dataSource;
}
set
{
this.dataSource = value;
BindTextBox();
}
}
[Editor("System.Windows.Forms.Design.DataMemberFieldEditor", typeof(System.Drawing.Design.UITypeEditor))]
public String DataMember
{
get
{
return this.dataMember;
}
set
{
this.dataMember = value;
BindTextBox();
}
}