Inheritance: RibbonToContent
        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonDesignBase class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonDesignBase(KryptonRibbon ribbon,
                                        NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(needPaint != null);

            // Cache incoming values
            _ribbon = ribbon;
            _needPaint = needPaint;

            // Create and add the draw content for display inside the tab
            _contentProvider = new DesignTextToContent(ribbon);
            Add(new ViewDrawContent(_contentProvider, this, VisualOrientation.Top));

            // Use a controller to change state because of mouse movement
            ViewHightlightController controller = new ViewHightlightController(this, needPaint);
            controller.Click += new EventHandler(OnClick);
            MouseController = controller;
        }
Exemple #2
0
        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonDesignBase class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonDesignBase(KryptonRibbon ribbon,
                                        NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(needPaint != null);

            // Cache incoming values
            Ribbon     = ribbon;
            _needPaint = needPaint;

            // Create and add the draw content for display inside the tab
            _contentProvider = new DesignTextToContent(ribbon);
            Add(new ViewDrawContent(_contentProvider, this, VisualOrientation.Top));

            // Use a controller to change state because of mouse movement
            ViewHightlightController controller = new ViewHightlightController(this, needPaint);

            controller.Click += OnClick;
            MouseController   = controller;
        }