I want to create a custom control that contains 2 panels inside 1 panel. I expose the outer panel to the users so all controls they add inside my custom control will be added to the outer panel. But i want them to be added to the inner panel. I have tried
overriding the addedcontrol function but when i do this the control is already added to the outer control and i have to add it to the inner panel AND delete it from the outer panel. This caused it to lose the event hooked to the button. I then tried by extending
the controlcollection class, and changing the add function. This way the control gets added to the correct panel without being added to the wrong one first and having to delete it later on.
However this yields the same problem, my event handler no longer works.
Any advice on how to solve this? Code can be found below:
using System; using System.Collections.Generic; using System.Linq; using System. ...
Go to the complete details ...