2011-05-05 81 views
0

我有[AttributeProvider(typeof(IListSource))]]标记,它允许我通过Visual Studio编辑器中的下拉列表编辑数据源字段。是否有类似的标签使用,所以我可以用同样的方式编辑DataMember属性。现在,我有在数据成员,如果我要继续找了字段名,其采取了很多的时间价值型...标记编辑Visual Studio设计器中用户控件的DataMember

[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(); 
     } 
    } 

回答

0

我结束了使用[可浏览(真)]。这让我编辑字段作为文本字段,但没有下拉菜单...

相关问题