Simple: handle the Resize event.
public partial class MyUserControl : UserControl
{
public MyUserControl()
{
InitializeComponent();
ShowSize("Constructor");
}
private void ShowSize(string from)
{
Debug.WriteLine("{0} : ({1}, {2})", from, Width, Height);
}
private void MyUserControl_Load(object sender, EventArgs e)
{
ShowSize("Load");
}
private void MyUserControl_Resize(object sender, EventArgs e)
{
ShowSize("Resize");
}
}
Add to a form, and set as Dock:Fill in the designer.
Run the app, and you get:
Constructor : (150, 150)
Resize : (357, 188)
Load : (357, 188)
Resize : (531, 381)
Where the Form original size was: (373, 226) and the form was resized in the Form Load event to (547, 419)