/// <summary>
        /// Gets the method used to draw the background of a ribbon item.
        /// </summary>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>PaletteRibbonBackStyle value.</returns>
        public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteState state)
        {
            if (_apply)
            {
                PaletteRibbonColorStyle ret = _primaryBack.GetRibbonBackColorStyle(_override ? _state : state);

                if (ret == PaletteRibbonColorStyle.Inherit)
                    ret = _backupBack.GetRibbonBackColorStyle(state);

                return ret;
            }
            else
                return _backupBack.GetRibbonBackColorStyle(state);
        }
示例#2
0
        /// <summary>
        /// Gets the method used to draw the background of a ribbon item.
        /// </summary>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>PaletteRibbonBackStyle value.</returns>
        public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteState state)
        {
            if (Apply)
            {
                PaletteRibbonColorStyle ret = _primaryBack.GetRibbonBackColorStyle(Override ? OverrideState : state);

                if (ret == PaletteRibbonColorStyle.Inherit)
                {
                    ret = _backupBack.GetRibbonBackColorStyle(state);
                }

                return(ret);
            }
            else
            {
                return(_backupBack.GetRibbonBackColorStyle(state));
            }
        }