public override void AddObjects(ICollection modelObjects)
{
if (this.VirtualListDataSource == null)
return;
// Give the world a chance to cancel or change the added objects
ItemsAddingEventArgs args = new ItemsAddingEventArgs(modelObjects);
this.OnItemsAdding(args);
if (args.Canceled)
return;
try {
this.BeginUpdate();
this.VirtualListDataSource.AddObjects(args.ObjectsToAdd);
this.BuildList();
}
finally {
this.EndUpdate();
}
}