Here is the final solution:
- Please read out discussion in the comments to the question. I think you have everything you need.
- Try it all, at last! You are wasting too much time on asking. You will find out how it all works when you try to create some custom control much clearly and even much faster.
[EDIT]
This is just a guess: maybe you cannot find a way to bind your control's property with a child control property. This can give you the idea:
public partial class MyControl {
TextBox MyTextBox = new TextBox();
public string MyTextBoxText {
get { return MyTextBox.Text; }
set {
if (value == MyTextBox.Text) return;
MyTextBox.Text = value;
}
}
}
This way, you don't expose children (it would be against proper encapsulation), but expose just the properties you need. The designer will pick them, too.
A bit more problem is exposing those "internal" events. Can you find out how to do it? This is pure thinking, there are no secrets except understanding how properties and event instances work.
—SA