Object Reference not set to an instance of an object in Background image RRS feed

  • Question

  • Hi All,

    I am using custom editor collection for a property(which contains the collection of custom controls)  in custom control. I have used the UITypeEditor for this proeprty as given in this link . Now when clicking the property, UI editors shows but when clicking the background image it shows the following error.


    Can anyone please help me to resolve this?

    Monday, February 12, 2018 9:52 AM

All replies

  • Hi Vinothini,

    Just as the message said, you did not set an instance for an object, in fact, this is a general error, you need to give a specific instance before you use an object, I'm not sure what object, because it is also widespread.

    Or maybe you can provide the code or project with OneDrive for my test.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, February 13, 2018 5:51 AM
  • Hi Stanly

    Sorry for the delay in getting back to you.

    Please find the reproducible sample in here.

    Click the usercontrol in the designer and open the property window click the QuickItems, the add one item from the combobox. Then click the items and properties will be listed in the PropertyGrid. Now click Image or BackgroundImage property , then the exception message will be thrown.

    Video to reproduce the issue here.



    Thursday, February 22, 2018 12:08 PM
  • Hi Stanly,

    The issue is still being reproduced in our source , can you please have a look in the attached sample and video in the last comment and revert us.



    Monday, June 3, 2019 11:19 AM
  • Hi Team,

    Can you please update on this.

    Sample - 

    Video -


    Nikhilesh O

    Wednesday, August 21, 2019 5:49 AM
  • Hi All,

    As our release is coming soon, so can you please update on this.


    Nikhilesh O

    Wednesday, September 11, 2019 11:39 AM