Here are the examples of the csharp api class System.Windows.Forms.Design.ParentControlDesigner.Initialize(System.ComponentModel.IComponent) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
15 Examples
0
1. Example
View licensepublic override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); if (this.Control is MetroPanel) { //this.EnableDesignMode(((MetroPanel)this.Control).ScrollablePanel, "ScrollablePanel"); } }
0
2. Example
View licensepublic override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); if (this.Control is MetroPanel) { //this.EnableDesignMode(((MetroPanel)this.Control).ScrollablePanel, "ScrollablePanel"); } }
0
3. Example
View licensepublic override void Initialize(IComponent component) { // Validate the parameter reference if (component == null) throw new ArgumentNullException("component"); // Let base class do standard stuff base.Initialize(component); // The resizing handles around the control need to change depending on the // value of the AutoSize and AutoSizeMode properties. When in AutoSize you // do not get the resizing handles, otherwise you do. AutoResizeHandles = true; // Remember the actual control being designed _workspace = (KryptonWorkspace)component; // Get access to the services _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); // We need to know when we are being removed/changed _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving); }
0
4. Example
View licensepublic override void Initialize(IComponent component) { base.Initialize(component); if (component is HeaderlessTabControl) { HeaderlessTabControl tabControl = component as HeaderlessTabControl; this.EnableDesignMode(tabControl.SelectedTab, "SelectedTab"); } }
0
5. Example
View licensepublic override void Initialize(IComponent component) { m_page = component as MultiPanelPage; if (m_page == null) DisplayError(new Exception("You attempted to use a MultiPanelPageDesigner with a class that does not inherit from MultiPanelPage.")); base.Initialize(component); }
0
6. Example
View licensepublic override void Initialize(IComponent component) { // Let base class do sta/n ..... /n //View Source file for more details /n }
0
7. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component != null); // Validate the parameter reference if (component == null) throw new ArgumentNullException("component"); // Let base class do standard stuff base.Initialize(component); // Cast to correct type _gallery = (KryptonGallery)component; // We need to know when we are being removed _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving); }
0
8. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component != null); // Validate the parameter reference if (component == null) throw new ArgumentNullException("component"); // Let base class do standard stuff base.Initialize(component); // Cast to correct type _ribbon = (KryptonRibbon)component; // Hook into ribbon events _ribbon.GetViewManager().MouseUpProcessed += new MouseEventHandler(OnRibbonMouseUp); _ribbon.GetViewManager().DoubleClickProcessed += new PointHandler(OnRibbonDoubleClick); _ribbon.SelectedTabChanged += new EventHandler(OnSelectedTabChanged); _ribbon.DesignTimeAddTab += new EventHandler(OnAddTab); // Get access to the services _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); _selectionService = (ISelectionService)GetService(typeof(ISelectionService)); // We need to know when we are being removed _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving); _changeService.ComponentChanged += new ComponentChangedEventHandler(OnComponentChanged); }
0
9. Example
View licensepublic override void Initialize(IComponent component) { m_mpanel = component as MultiPanel; if (m_mpanel == null) { DisplayError(new ArgumentException("Tried to use the MultiPanelControlDesign with a class that does not inherit from MultiPanel.", "component")); return; } base.Initialize(component); var iccs = (IComponentChangeService)GetService(typeof(IComponentChangeService)); if (iccs != null) { iccs.ComponentRemoved += ComponentRemoved; } var s = (ISelectionService)GetService(typeof(ISelectionService)); if (s != null) { s.SelectionChanged += s_SelectionChanged; } }
0
10. Example
View licensepublic override void Initialize(IComponent component) { // Perform common base class initializating base.Initialize(component); // The resizing handles around the control need to change depending on the // value of the AutoSize and AutoSizeMode properties. When in AutoSize you // do not get the resizing handles, otherwise you do. AutoResizeHandles = true; // Remember references to components involved in design _page = (KryptonPage)component; // Hook into page events _page.FlagsChanged += new KryptonPageFlagsEventHandler(OnPageFlagsChanged); // Acquire service interfaces _selectionService = (ISelectionService)GetService(typeof(ISelectionService)); _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); // We need to know when we are being removed _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving); // Lock the component from user size/location change PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)["Locked"]; if ((descriptor != null) && (ParentNavigator != null)) descriptor.SetValue(component, true); }
0
11. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component != null); // Validate the parameter reference if (component == null) throw new ArgumentNullException("component"); // Let base class do standard stuff base.Initialize(component); // Cast to correct type _groupBox = component as KryptonGroupBox; // The resizing handles around the control need to change depending on the // value of the AutoSize and AutoSizeMode properties. When in AutoSize you // do not get the resizing handles, otherwise you do. AutoResizeHandles = true; // Acquire service interfaces _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); // Let the internal panel in the container be designable if (_groupBox != null) EnableDesignMode(_groupBox.Panel, "Panel"); }
0
12. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component != null); // Validate the parameter reference if (component == null) throw new ArgumentNullException("component"); // Let base class do standard stuff base.Initialize(component); // Cast to correct type _group = component as KryptonGroup; // The resizing handles around the control need to change depending on the // value of the AutoSize and AutoSizeMode properties. When in AutoSize you // do not get the resizing handles, otherwise you do. AutoResizeHandles = true; // Acquire service interfaces _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); // Let the internal panel in the container be designable if (_group != null) EnableDesignMode(_group.Panel, "Panel"); }
0
13. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component !/n ..... /n //View Source file for more details /n }
0
14. Example
View licensepublic override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); var panel = Control as HidableDetailPanel; if (panel != null) EnableDesignMode(panel.DetailArea, "DetailArea"); var service = GetService(typeof(DesignerActionService)) as DesignerActionService; service?.Remove(component); }
0
15. Example
View licensepublic override void Initialize(IComponent component) { Debug.Assert(component !/n ..... /n //View Source file for more details /n }