Inheritance: ComponentFactory.Krypton.Toolkit.ViewManager
示例#1
0
        /// <summary>
        /// Initialize a new instance of the VisualPopupQATOverflow class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="contents">Reference to original contents which has overflow items.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupQATOverflow(KryptonRibbon ribbon,
                                      ViewLayoutRibbonQATContents contents,
                                      IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);

            // Remember references needed later
            _ribbon = ribbon;

            // Create a view element for drawing the group
            _viewQAT = new ViewDrawRibbonQATOverflow(ribbon, NeedPaintDelegate);

            // Create and add the element used to synch and draw the actual contents
            _viewQATContents = new ViewLayoutRibbonQATFromOverflow(this, ribbon,
                                                                   NeedPaintDelegate,
                                                                   true, contents);
            _viewQAT.Add(_viewQATContents);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonQATOverflowManager(ribbon, this, _viewQATContents, _viewQAT);
        }
        /// <summary>
        /// Initialize a new instance of the VisualPopupQATOverflow class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="contents">Reference to original contents which has overflow items.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupQATOverflow(KryptonRibbon ribbon,
                                      ViewLayoutRibbonQATContents contents,
                                      IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);

            // Remember references needed later
            _ribbon = ribbon;

            // Create a view element for drawing the group
            _viewQAT = new ViewDrawRibbonQATOverflow(ribbon, NeedPaintDelegate);

            // Create and add the element used to synch and draw the actual contents
            _viewQATContents = new ViewLayoutRibbonQATFromOverflow(this, ribbon,
                                                                   NeedPaintDelegate,
                                                                   true, contents);
            _viewQAT.Add(_viewQATContents);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonQATOverflowManager(ribbon, this, _viewQATContents, _viewQAT);
        }