Custom Component - Initialize Properties

  • Thread starter Thread starter Fred Chen
  • Start date Start date
F

Fred Chen

I've read the following article about creating Component Designers.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/custdsgnrdotnet.asp

Does anyone know how to use this to intialize your component's
properties? The article says that it is possible to change the
component's properties by overriding the PostFilterProperties method,
but it does not show you how to do this.

Does anyone know how to modify your custom component by using a
ComponentDesigner?

Thanks,
Fred
 
Hi,
Check out this web site:
http://www.windowsforms.net/Default.aspx?tabindex=3&tabid=40#Designer
Look at the designer section. It has some pretty good article about writing
designers.
Basically you can override ComponentDesigner.Initialize method to
initialize component's properties. PreFilterProperties and
PostFilterProperties can be used to add/remove/replace properties on a
component. You can also read MSDN for ComponentDesigner class.
Hope this helps.
Thanks
Xin
 
Back
Top