System.Windows.Forms.Design.ParentControlDesigner.Initialize(System.ComponentModel.IComponent)

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 7

1. Example

Project: Mist
Source File: MetroPanelDesigner.cs
View license
public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);

            if (this.Control is MetroPanel)
            {
                //this.EnableDesignMode(((MetroPanel)this.Control).ScrollablePanel, "ScrollablePanel");
            }
        }

2. Example

Project: winauth
Source File: MetroPanelDesigner.cs
View license
public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);

            if (this.Control is MetroPanel)
            {
                //this.EnableDesignMode(((MetroPanel)this.Control).ScrollablePanel, "ScrollablePanel");
            }
        }

3. Example

Project: Krypton
Source File: KryptonWorkspaceDesigner.cs
View license
public 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);
        }

4. Example

Project: AeroSuite
Source File: HeaderlessTabControl.cs
View license
public override void Initialize(IComponent component)
            {
                base.Initialize(component);

                if (component is HeaderlessTabControl)
                {
                    HeaderlessTabControl tabControl = component as HeaderlessTabControl;
                    this.EnableDesignMode(tabControl.SelectedTab, "SelectedTab");
                }
            }

5. Example

Project: NFirmwareEditor
Source File: MultiPanel.cs
View license
public 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);
		}

6. Example

Project: Krypton
Source File: KryptonNavigatorDesigner.cs
View license
public override void Initialize(IComponent component)
        {
            // Let base class do sta/n ..... /n //View Source file for more details /n }

7. Example

Project: Krypton
Source File: KryptonGalleryDesigner.cs
View license
public 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);
        }

8. Example

Project: Krypton
Source File: KryptonRibbonDesigner.cs
View license
public 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);
        }

9. Example

Project: NFirmwareEditor
Source File: MultiPanel.cs
View license
public 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;
			}
		}

10. Example

Project: Krypton
Source File: KryptonPageDesigner.cs
View license
public 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);
        }

11. Example

Project: Krypton
Source File: KryptonGroupBoxDesigner.cs
View license
public 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");
        }

12. Example

Project: Krypton
Source File: KryptonGroupDesigner.cs
View license
public 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");
        }

13. Example

View license
public override void Initialize(IComponent component)
        {
            Debug.Assert(component !/n ..... /n //View Source file for more details /n }

14. Example

Project: TaskScheduler
Source File: HidableDetailPanel.cs
View license
public 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);
		}

15. Example

View license
public override void Initialize(IComponent component)
        {
            Debug.Assert(component !/n ..... /n //View Source file for more details /n }