ComponentFactory.Krypton.Toolkit.PaletteOffice2013Base.GetBackColor2 C# (CSharp) Method

GetBackColor2() public method

Gets the second back color.
public GetBackColor2 ( PaletteBackStyle style, PaletteState state ) : Color
style PaletteBackStyle Background style.
state PaletteState Palette value should be applicable to this state.
return Color
        public override Color GetBackColor2(PaletteBackStyle style, PaletteState state)
        {
            // We do not provide override values
            if (CommonHelper.IsOverrideStateExclude(state, PaletteState.NormalDefaultOverride))
                return Color.Empty;

            switch (style)
            {
                case PaletteBackStyle.GridHeaderColumnList:
                case PaletteBackStyle.GridHeaderColumnCustom1:
                case PaletteBackStyle.GridHeaderRowList:
                case PaletteBackStyle.GridHeaderRowCustom1:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        default:
                        case PaletteState.Normal:
                        case PaletteState.Tracking:
                            return _ribbonColors[(int)SchemeOfficeColors.GridListNormal2];
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.GridListPressed2];
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridListSelected];
                    }
                case PaletteBackStyle.GridHeaderColumnSheet:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        default:
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetColNormal2];
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetColPressed2];
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetColSelected2];
                    }
                case PaletteBackStyle.GridHeaderRowSheet:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        default:
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetRowNormal];
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetRowPressed];
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetRowSelected];
                    }
                case PaletteBackStyle.GridDataCellList:
                case PaletteBackStyle.GridDataCellCustom1:
                    if (state == PaletteState.CheckedNormal)
                        return _ribbonColors[(int)SchemeOfficeColors.GridDataCellSelected];
                    else
                        return SystemColors.Window;
                case PaletteBackStyle.GridDataCellSheet:
                    if (state == PaletteState.CheckedNormal)
                        return _buttonBackColors[7];
                    else
                        return SystemColors.Window;
                case PaletteBackStyle.TabHighProfile:
                case PaletteBackStyle.TabStandardProfile:
                case PaletteBackStyle.TabLowProfile:
                case PaletteBackStyle.TabOneNote:
                case PaletteBackStyle.TabCustom1:
                case PaletteBackStyle.TabCustom2:
                case PaletteBackStyle.TabCustom3:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            if (style == PaletteBackStyle.TabLowProfile)
                                return Color.Empty;
                            else
                                return _disabledBack;
                        case PaletteState.Normal:
                            if (style == PaletteBackStyle.TabLowProfile)
                                return Color.Empty;
                            else
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack2];
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            if (style == PaletteBackStyle.TabLowProfile)
                                return Color.Empty;
                            else
                                return SystemColors.Window;
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedPressed:
                        case PaletteState.CheckedTracking:
                            return SystemColors.Window;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.TabDock:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.HeaderDockInactiveBack1];
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            return _buttonBackColors[4];
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedPressed:
                        case PaletteState.CheckedTracking:
                            return SystemColors.Window;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.TabDockAutoHidden:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        case PaletteState.Normal:
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.HeaderDockInactiveBack1];
                        case PaletteState.Tracking:
                        case PaletteState.CheckedTracking:
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _buttonBackColors[4];
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.HeaderForm:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderHeaderInactive2];
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderHeaderActive2];
                case PaletteBackStyle.HeaderCalendar:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderPrimaryBack1];
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderPrimaryBack2];
                case PaletteBackStyle.HeaderPrimary:
                case PaletteBackStyle.HeaderCustom1:
                case PaletteBackStyle.HeaderCustom2:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderPrimaryBack2];
                case PaletteBackStyle.HeaderDockInactive:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderDockInactiveBack2];
                case PaletteBackStyle.HeaderDockActive:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _buttonBackColors[7];
                case PaletteBackStyle.HeaderSecondary:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderSecondaryBack2];
                case PaletteBackStyle.SeparatorHighInternalProfile:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.SeparatorHighInternalBorder2];
                case PaletteBackStyle.SeparatorHighProfile:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.SeparatorHighBorder2];
                case PaletteBackStyle.SeparatorLowProfile:
                case PaletteBackStyle.SeparatorCustom1:
                case PaletteBackStyle.PanelClient:
                case PaletteBackStyle.PanelCustom1:
                case PaletteBackStyle.ControlGroupBox:
                case PaletteBackStyle.GridBackgroundList:
                case PaletteBackStyle.GridBackgroundSheet:
                case PaletteBackStyle.GridBackgroundCustom1:
                    return _ribbonColors[(int)SchemeOfficeColors.PanelClient];
                case PaletteBackStyle.PanelAlternate:
                    return _ribbonColors[(int)SchemeOfficeColors.PanelAlternative];
                case PaletteBackStyle.PanelRibbonInactive:
                    return _ribbonColors[(int)SchemeOfficeColors.FormBorderInactiveDark];
                case PaletteBackStyle.FormMain:
                case PaletteBackStyle.FormCustom1:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderInactiveDark];
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderActiveDark];
                case PaletteBackStyle.ControlClient:
                case PaletteBackStyle.ControlAlternate:
                case PaletteBackStyle.ControlCustom1:
                    return SystemColors.Window;
                case PaletteBackStyle.InputControlStandalone:
                case PaletteBackStyle.InputControlRibbon:
                case PaletteBackStyle.InputControlCustom1:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.InputControlBackDisabled];
                    else
                    {
                        if ((state == PaletteState.Tracking) || (style == PaletteBackStyle.InputControlStandalone))
                            return _ribbonColors[(int)SchemeOfficeColors.InputControlBackNormal];
                        else
                            return _ribbonColors[(int)SchemeOfficeColors.InputControlBackInactive];
                    }
                case PaletteBackStyle.ControlRibbon:
                    return _ribbonColors[(int)SchemeOfficeColors.RibbonTabSelected4];
                case PaletteBackStyle.ControlRibbonAppMenu:
                    return _ribbonColors[(int)SchemeOfficeColors.AppButtonBack2];
                case PaletteBackStyle.ControlToolTip:
                    return _ribbonColors[(int)SchemeOfficeColors.ToolTipBottom];
                case PaletteBackStyle.ContextMenuOuter:
                    return _contextMenuBack;
                case PaletteBackStyle.ContextMenuSeparator:
                case PaletteBackStyle.ContextMenuItemSplit:
                    switch (state)
                    {
                        case PaletteState.Tracking:
                            return _buttonBackColors[3];
                        default:
                            return _contextMenuBack;
                    }
                case PaletteBackStyle.ContextMenuInner:
                    return _contextMenuBack;
                case PaletteBackStyle.ContextMenuHeading:
                    return _ribbonColors[(int)SchemeOfficeColors.ContextMenuHeadingBack];
                case PaletteBackStyle.ContextMenuItemImageColumn:
                    return _ribbonColors[(int)SchemeOfficeColors.ContextMenuImageColumn];
                case PaletteBackStyle.ContextMenuItemImage:
                    return _contextMenuImageBackChecked;
                case PaletteBackStyle.ButtonForm:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                        case PaletteState.Normal:
                        case PaletteState.NormalDefaultOverride:
                            return Color.Empty;
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack2Checked];
                        case PaletteState.Tracking:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack2Track];
                        case PaletteState.CheckedTracking:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack2CheckTrack];
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack2Pressed];
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.ButtonFormClose:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                        case PaletteState.Normal:
                        case PaletteState.NormalDefaultOverride:
                            return Color.Empty;
                        case PaletteState.CheckedNormal:
                            return _formCloseChecked2;
                        case PaletteState.Tracking:
                            return _formCloseTracking2;
                        case PaletteState.CheckedTracking:
                            return _formCloseCheckedTracking2;
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _formClosePressed2;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.ButtonStandalone:
                case PaletteBackStyle.ButtonGallery:
                case PaletteBackStyle.ButtonAlternate:
                case PaletteBackStyle.ButtonLowProfile:
                case PaletteBackStyle.ButtonBreadCrumb:
                case PaletteBackStyle.ButtonListItem:
                case PaletteBackStyle.ButtonCommand:
                case PaletteBackStyle.ButtonButtonSpec:
                case PaletteBackStyle.ButtonCalendarDay:
                case PaletteBackStyle.ButtonCluster:
                case PaletteBackStyle.ButtonCustom1:
                case PaletteBackStyle.ButtonCustom2:
                case PaletteBackStyle.ButtonCustom3:
                case PaletteBackStyle.ButtonInputControl:
                case PaletteBackStyle.ContextMenuItemHighlight:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            if (style == PaletteBackStyle.ButtonGallery)
                                return _ribbonColors[(int)SchemeOfficeColors.RibbonGalleryBack1];
                            else
                                return _buttonBackColors[1];
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack2];
                        case PaletteState.NormalDefaultOverride:
                            if ((style == PaletteBackStyle.ButtonLowProfile) ||
                                (style == PaletteBackStyle.ButtonBreadCrumb) ||
                                (style == PaletteBackStyle.ButtonListItem) ||
                                (style == PaletteBackStyle.ButtonCommand) ||
                                (style == PaletteBackStyle.ButtonButtonSpec) ||
                                (style == PaletteBackStyle.ContextMenuItemHighlight))
                                return Color.Empty;
                            else
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalDefaultBack2];
                        case PaletteState.CheckedNormal:
                            if (style == PaletteBackStyle.ButtonInputControl)
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack2];
                            else
                                return _buttonBackColors[7];
                        case PaletteState.Tracking:
                                return _buttonBackColors[3];
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _buttonBackColors[5];
                        case PaletteState.CheckedTracking:
                            if (style == PaletteBackStyle.ButtonInputControl)
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
                            else
                                return _buttonBackColors[9];
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.ButtonNavigatorStack:
                case PaletteBackStyle.ButtonNavigatorOverflow:
                case PaletteBackStyle.ButtonNavigatorMini:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _buttonBackColors[1];
                        case PaletteState.Tracking:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorTrack2];
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorPressed2];
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedTracking:
                        case PaletteState.CheckedPressed:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorChecked2];
                        default:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalNavigatorBack2];
                    }
                default:
                    throw new ArgumentOutOfRangeException("style");
            }
        }
PaletteOffice2013Base