예제 #1
0
        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupTitle class.
        /// </summary>
        /// <param name="ribbon">Source ribbon control.</param>
        /// <param name="ribbonGroup">Ribbon group to display title for.</param>
        public ViewDrawRibbonGroupTitle(KryptonRibbon ribbon,
                                        KryptonRibbonGroup ribbonGroup)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            _ribbon      = ribbon;
            _ribbonGroup = ribbonGroup;

            // Use a class to convert from ribbon group to content interface
            _contentProvider = new RibbonGroupTextToContent(ribbon.StateCommon.RibbonGeneral,
                                                            ribbon.StateNormal.RibbonGroupNormalTitle);
        }
        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupText class.
        /// </summary>
        /// <param name="ribbon">Source ribbon control.</param>
        /// <param name="ribbonGroup">Ribbon group to display title for.</param>
        /// <param name="firstText">Should show the first group text.</param>
        public ViewDrawRibbonGroupText(KryptonRibbon ribbon,
                                       KryptonRibbonGroup ribbonGroup,
                                       bool firstText)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            _ribbon      = ribbon;
            _ribbonGroup = ribbonGroup;
            _firstText   = firstText;

            // Use a class to convert from ribbon group to content interface
            _contentProvider = new RibbonGroupTextToContent(ribbon.StateCommon.RibbonGeneral,
                                                            ribbon.StateNormal.RibbonGroupCollapsedText);
        }