Beispiel #1
0
            protected override void Dispose(bool disposing)
            {
                if (_designedControl != null)
                {
                    this.DesignerPanel.Controls.Remove(_designedControl);
                    _designedControl = null;
                }

                if (_componentTray != null)
                {
                    this.ComponentTrayPanel.Controls.Remove(_componentTray);
                    _componentTray.Dispose();
                    _componentTray = null;
                }

                base.Dispose(disposing);
            }
Beispiel #2
0
            public DesignerViewFrame(Control designedControl, ComponentTray tray)
            {
                if (designedControl == null)
                {
                    throw new ArgumentNullException("designedControl");
                }
                if (tray == null)
                {
                    throw new ArgumentNullException("tray");
                }
                //
                // The InitializeComponent() call is required for Windows Forms designer support.
                //
                InitializeComponent();

                _designedControl = designedControl;
                this.SuspendLayout();
                this.DesignerPanel.Controls.Add(designedControl);
                this.ResumeLayout();

                this.ComponentTray = tray;
            }