locked
Under what circumstances is ControlDesigner.InitializeExistingComponent called? RRS feed

  • Question

  • When and by which components is ControlDesigner.InitializeExistingComponent called?  What work should be done in this method?

    Thanks


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, December 2, 2010 1:18 AM

Answers

  • Hi Dan Elliott,

     

    The InitializeExistingComponent method is called when an existing component is being reinitialized. For example, this may occur after the user drags a component to another container.

     

    You may use the defaultValues dictionary to apply recommended defaults to properties; however, you should not modify component properties aside from those stored in the dictionary, because this existing component may already have properties set on it.

    The default implementation of this method does nothing.

     

    -       from http://msdn.microsoft.com/en-us/library/system.componentmodel.design.componentdesigner.initializeexistingcomponent.aspx

     

    Is there anything unclear with this document?

     

    By the way, I wonder what your requirement is. Is there anything I could help you?

     

    Best regards,

    Ling Wang


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by Jing0 Friday, December 17, 2010 10:26 AM
    • Marked as answer by Jing0 Monday, December 20, 2010 6:49 AM
    Friday, December 3, 2010 7:48 AM