Asked by:
Object Reference not set to an instance of an object in Background image

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?
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.
Regards,
Stanly
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 MSDNFSF@microsoft.com. -
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.
Regards,
Vinothini
-
-
-
-
-
-
-
-
-
-
-
-
-