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

GetBackColor1() public method

Gets the first background color.
public GetBackColor1 ( PaletteBackStyle style, PaletteState state ) : Color
style PaletteBackStyle Background style.
state PaletteState Palette value should be applicable to this state.
return Color
        public override Color GetBackColor1(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.GridListNormal1];
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.GridListPressed1];
                        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.GridSheetColNormal1];
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetColPressed1];
                        case PaletteState.CheckedNormal:
                            return _ribbonColors[(int)SchemeOfficeColors.GridSheetColSelected1];
                    }
                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[6];
                    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 SystemColors.Window;
                        case PaletteState.Pressed:
                        case PaletteState.Tracking:
                            if (style == PaletteBackStyle.TabLowProfile)
                                return Color.Empty;
                            else if (style == PaletteBackStyle.TabHighProfile)
                            {
                                if (state == PaletteState.Tracking)
                                    return _buttonBackColors[2];
                                else
                                    return _buttonBackColors[4];
                            }
                            else
                                return SystemColors.Window;
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedPressed:
                        case PaletteState.CheckedTracking:
                            if (style == PaletteBackStyle.TabHighProfile)
                            {
                                if (state == PaletteState.CheckedNormal)
                                    return _buttonBackColors[6];
                                else if (state == PaletteState.CheckedPressed)
                                    return _buttonBackColors[4];
                                else
                                    return _buttonBackColors[8];
                            }
                            else
                                return SystemColors.Window;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.TabDock:
                case PaletteBackStyle.TabDockAutoHidden:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return _disabledBack;
                        case PaletteState.Normal:
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedPressed:
                        case PaletteState.CheckedTracking:
                        case PaletteState.Pressed:
                        case PaletteState.Tracking:
                            return SystemColors.Window;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                case PaletteBackStyle.HeaderForm:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderHeaderInactive1];
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderHeaderActive1];
                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.HeaderPrimaryBack1];
                case PaletteBackStyle.HeaderDockInactive:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderDockInactiveBack1];
                case PaletteBackStyle.HeaderDockActive:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _buttonBackColors[6];
                case PaletteBackStyle.HeaderSecondary:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.HeaderSecondaryBack1];
                case PaletteBackStyle.SeparatorHighInternalProfile:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.SeparatorHighInternalBorder1];
                case PaletteBackStyle.SeparatorHighProfile:
                    if (state == PaletteState.Disabled)
                        return _disabledBack;
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.SeparatorHighBorder1];
                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.FormBorderInactiveLight];
                case PaletteBackStyle.FormMain:
                case PaletteBackStyle.FormCustom1:
                    if (state == PaletteState.Disabled)
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderInactiveLight];
                    else
                        return _ribbonColors[(int)SchemeOfficeColors.FormBorderActiveLight];
                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.AppButtonBack1];
                case PaletteBackStyle.ControlToolTip:
                    return _toolTipBack1;
                case PaletteBackStyle.ContextMenuOuter:
                    return _contextMenuBack;
                case PaletteBackStyle.ContextMenuSeparator:
                case PaletteBackStyle.ContextMenuItemSplit:
                    switch (state)
                    {
                        case PaletteState.Tracking:
                                return _buttonBackColors[2];
                        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.FormButtonBack1Checked];
                        case PaletteState.Tracking:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack1Track];
                        case PaletteState.CheckedTracking:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack1CheckTrack];
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _ribbonColors[(int)SchemeOfficeColors.FormButtonBack1Pressed];
                        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 _formCloseChecked1;
                        case PaletteState.Tracking:
                            return _formCloseTracking1;
                        case PaletteState.CheckedTracking:
                            return _formCloseCheckedTracking1;
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _formClosePressed1;
                        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 _disabledBack;
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
                        case PaletteState.NormalDefaultOverride:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalDefaultBack1];
                        case PaletteState.CheckedNormal:
                            if (style == PaletteBackStyle.ButtonInputControl)
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
                            else
                                return _buttonBackColors[6];
                        case PaletteState.Tracking:
                                return _buttonBackColors[2];
                        case PaletteState.Pressed:
                        case PaletteState.CheckedPressed:
                            return _buttonBackColors[4];
                        case PaletteState.CheckedTracking:
                            if (style == PaletteBackStyle.ButtonInputControl)
                                return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
                            else
                                return _buttonBackColors[8];
                        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.ButtonNavigatorTrack1];
                        case PaletteState.Pressed:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorPressed1];
                        case PaletteState.CheckedNormal:
                        case PaletteState.CheckedTracking:
                        case PaletteState.CheckedPressed:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorChecked1];
                        default:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalNavigatorBack1];
                    }
                default:
                    throw new ArgumentOutOfRangeException("style");
            }
        }
PaletteOffice2013Base