public void InstantiateIn(Control container)
 {
     DeclarativeCatalogPart child = new DeclarativeCatalogPart {
         WebPartsTemplate = new SampleCatalogPartTemplate(),
         ID = "SampleCatalogPart"
     };
     container.Controls.Add(child);
 }
 public override void Initialize(IComponent component)
 {
     ControlDesigner.VerifyInitializeArgument(component, typeof(DeclarativeCatalogPart));
     base.Initialize(component);
     this._catalogPart = (DeclarativeCatalogPart) component;
     if (base.View != null)
     {
         base.View.SetFlags(ViewFlags.TemplateEditing, true);
     }
 }