/// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent 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;

            // Cast to correct type
            _domainUpDown = component as KryptonDomainUpDown;

            if (_domainUpDown != null)
            {
                // Hook into numeric updown events
                _domainUpDown.GetViewManager().MouseUpProcessed     += OnDomainUpDownMouseUp;
                _domainUpDown.GetViewManager().DoubleClickProcessed += OnDomainUpDownDoubleClick;
            }

            // Get access to the design 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 += OnComponentRemoving;
        }
        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent 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;

            // Cast to correct type
            _domainUpDown = component as KryptonDomainUpDown;

            if (_domainUpDown != null)
            {
                // Hook into numeric updown events
                _domainUpDown.GetViewManager().MouseUpProcessed += new MouseEventHandler(OnDomainUpDownMouseUp);
                _domainUpDown.GetViewManager().DoubleClickProcessed += new PointHandler(OnDomainUpDownDoubleClick);
            }

            // Get access to the design 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);
        }