如果是WebForm是不是属性没有保存状态!最好把属性都放在ViewState里面!

解决方案 »

  1.   

    winform似乎是在EditValue()需要作什么通知……
    正在调查中,请大家共同出谋划策!
      

  2.   

    参考
    Building Windows Forms Controls and Components with Rich Design-Time Features, Part 2
    http://msdn.microsoft.com/msdnmag/issues/03/05/Design-TimeControls/default.aspxor Chris Sells' new book:
    Windows Forms Programming in C#
    by Chris Sells 
    Publisher: Addison-Wesley Pub Co; 1st edition (August 29, 2003) 
    ISBN: 0321116208 
      

  3.   

    I have read the document, it gave a good summarization on the UITypeEditor. But now I found my problem seemed from the object of the property which the UITypeEditor edit.
    That is, this proerty is readonly, so the editor could only modify its items but not itself.
    So if it's just the reason, I must give a changed message manually in EditValue method.
    But how can I do it?
      

  4.   

    By the way,  saucer, do you have the e-book of Windows Forms Programming in C#?
    And can you send it to me?
     
    Thanks a lot for the help!
      

  5.   

    注意一下ITypeDescriptorContext.OnComponentChanged()方法。