private void OnLayoutItemCreatedNew(LayoutItemTemplateContainerBase templateContainer, IModelViewLayoutElement layoutItemModel, ViewItem viewItem) { if (!DelayedItemsInitialization) { templateContainer.Instantiate(); } OnLayoutItemCreated(new ItemCreatedEventArgs(layoutItemModel, viewItem, templateContainer)); OnCustomizeAppearance(new CustomizeAppearanceEventArgs(layoutItemModel.Id, new WebLayoutItemAppearanceAdapter(templateContainer), null)); }
private static void AddControls(ControlCollection controlCollection, IEnumerable <Control> controlsToLayout) { foreach (Control control in controlsToLayout) { LayoutItemTemplateContainerBase templateContainer = control as LayoutItemTemplateContainerBase; if (templateContainer != null && templateContainer.LayoutManager.DelayedItemsInitialization) { templateContainer.Instantiate(); } controlCollection.Add(control); } }