// This method returns an instance of the view for this root // designer. The "view" is the user interface that is presented // in a document window for the user to manipulate. object IRootDesigner.GetView(ViewTechnology technology) { if (technology != ViewTechnology.Default) { throw new ArgumentException("Not a supported view technology", "technology"); } if (m_view == null) { // Some type of displayable Form or control is required // for a root designer that overrides GetView(). In this // example, a Control of type RootDesignerView is used. // Any class that inherits from Control will work. m_view = new XDesignerView() { Designer = this }; } return m_view; }
// This method returns an instance of the view for this root // designer. The "view" is the user interface that is presented // in a document window for the user to manipulate. object IRootDesigner.GetView(ViewTechnology technology) { if (technology != ViewTechnology.Default) { throw new ArgumentException("Not a supported view technology", "technology"); } if (m_view == null) { // Some type of displayable Form or control is required // for a root designer that overrides GetView(). In this // example, a Control of type RootDesignerView is used. // Any class that inherits from Control will work. m_view = new XDesignerView() { Designer = this }; } return(m_view); }