internal void Clear()
{
IDesignerHost host = (IDesignerHost) GetService(typeof (IDesignerHost));
if (host != null)
{
using (DesignerTransaction transaction = host.CreateTransaction("Clear"))
{
IComponentChangeService changeService =
(IComponentChangeService) GetService(typeof (IComponentChangeService));
try
{
changeService.OnComponentChanging(this.fitLayout,
TypeDescriptor.GetProperties(this.fitLayout)["Items"]);
this.fitLayout.Items.Clear();
}
finally
{
changeService.OnComponentChanged(this.fitLayout,
TypeDescriptor.GetProperties(this.fitLayout)["Items"], null,
null);
}
this.UpdateDesignTimeHtml();
transaction.Commit();
}
this.Tag.SetDirty(true);
}
}