ComponentFactory.Krypton.Toolkit.KryptonGroupDesigner.Initialize C# (CSharp) Method

Initialize() public method

Initializes the designer with the specified component.
public Initialize ( IComponent component ) : void
component IComponent The IComponent to associate the designer with.
return void
        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");
        }