protected virtual void OnItemAdded(ControlEventArgs e)
{
// add the expando to the ControlCollection if it hasn't already
if (!this.Controls.Contains(e.Control))
{
this.Controls.Add(e.Control);
}
// check if the control is a TaskItem
if (e.Control is TaskItem)
{
TaskItem item = (TaskItem) e.Control;
// set anchor styles
item.Anchor = (AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right);
// tell the TaskItem who's its daddy...
item.Expando = this;
item.SystemSettings = this.systemSettings;
}
// update the layout of the controls
this.DoLayout();
//
if (ItemAdded != null)
{
ItemAdded(this, e);
}
}