ComponentFactory.Krypton.Toolkit.KryptonGroupPanelDesigner.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 with the designer.
return void
        public override void Initialize(IComponent component)
        {
            // Perform common base class initializating
            base.Initialize(component);

            // Remember references to components involved in design
            _panel = component as KryptonGroupPanel;

            // Acquire service interfaces
            _selectionService = (ISelectionService)GetService(typeof(ISelectionService));

            // If inside a Krypton group container then always lock the component from user size/location change
            if (_panel != null)
            {
                PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)["Locked"];
                if ((descriptor != null) && ((_panel.Parent is KryptonGroup) || (_panel.Parent is KryptonHeaderGroup)))
                    descriptor.SetValue(component, true);
            }
        }