ComponentFactory.Krypton.Toolkit.ViewControl.ViewControl C# (CSharp) Method

ViewControl() public method

Initialize a new instance of the ViewControl class.
public ViewControl ( VisualControl rootControl ) : System
rootControl VisualControl Top level visual control.
return System
        public ViewControl(VisualControl rootControl)
        {
            Debug.Assert(rootControl != null);

            // We use double buffering to reduce drawing flicker
            SetStyle(ControlStyles.OptimizedDoubleBuffer |
                     ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.UserPaint, true);

            // We need to repaint entire control whenever resized
            SetStyle(ControlStyles.ResizeRedraw, true);

            // We are not selectable
            SetStyle(ControlStyles.Selectable, false);

            // Default
            _transparentBackground = false;
            _inDesignMode = false;

            // Remember incoming references
            _rootControl = rootControl;

            // Create delegate so child elements can request a repaint
            _needPaintDelegate = new NeedPaintHandler(OnNeedPaint);
        }