public override void Initialize(IComponent component) { base.Initialize(component); // this.m_ExpandableNodePanel = base.Component as ExpandableNodePanel; if (this.m_ExpandableNodePanel == null) { this.DisplayError(new ArgumentException("ExpandableNodePanel == null")); return; } }
private void AddExpandableNodePanel3(object sender, EventArgs ea) { IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); if (host != null) { ExpandableNodePanel expandablePanel = host.CreateComponent(typeof(ExpandableNodePanel)) as ExpandableNodePanel; expandablePanel.Text = expandablePanel.Name; expandablePanel.Size = new Size(100, 100); expandablePanel.ShowTreeNodeButton = true; this.m_ExpandableNodeCollectionPanel.ExpandableNodePanels.Add(expandablePanel); } }