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.ButtonNormalBack2];
case PaletteState.Tracking:
case PaletteState.Pressed:
return _buttonBackColors[3];
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.ButtonNormalBack2];
case PaletteState.Tracking:
case PaletteState.CheckedTracking:
case PaletteState.Pressed:
case PaletteState.CheckedPressed:
return _buttonBackColors[3];
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.HeaderDockInactive:
case PaletteBackStyle.HeaderCustom1:
case PaletteBackStyle.HeaderCustom2:
if (state == PaletteState.Disabled)
return _disabledBack;
else
return _ribbonColors[(int)SchemeOfficeColors.HeaderPrimaryBack2];
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.PanelRibbonInactive:
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.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 _toolTipBack2;
case PaletteBackStyle.ContextMenuOuter:
return _contextMenuOuterBack;
case PaletteBackStyle.ContextMenuSeparator:
case PaletteBackStyle.ContextMenuItemSplit:
switch (state)
{
case PaletteState.Tracking:
return _buttonBackColors[3];
default:
return _contextMenuOuterBack;
}
case PaletteBackStyle.ContextMenuInner:
return _contextMenuInnerBack;
case PaletteBackStyle.ContextMenuHeading:
return _ribbonColors[(int)SchemeOfficeColors.ContextMenuHeadingBack];
case PaletteBackStyle.ContextMenuItemImageColumn:
return _ribbonColors[(int)SchemeOfficeColors.ContextMenuImageColumn];
case PaletteBackStyle.ContextMenuItemImage:
return _contextMenuImageBackChecked;
case PaletteBackStyle.ButtonGallery:
switch (state)
{
case PaletteState.Disabled:
return _disabledBack2;
case PaletteState.Normal:
case PaletteState.NormalDefaultOverride:
case PaletteState.CheckedNormal:
return _ribbonColors[(int)SchemeOfficeColors.RibbonGalleryBack2];
case PaletteState.Tracking:
case PaletteState.CheckedTracking:
return _buttonBackColors[2];
case PaletteState.Pressed:
case PaletteState.CheckedPressed:
return _buttonBackColors[4];
default:
throw new ArgumentOutOfRangeException("state");
}
case PaletteBackStyle.ButtonForm:
case PaletteBackStyle.ButtonFormClose:
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.ButtonStandalone:
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.ButtonNavigatorStack:
case PaletteBackStyle.ButtonNavigatorOverflow:
case PaletteBackStyle.ButtonNavigatorMini:
case PaletteBackStyle.ButtonCustom1:
case PaletteBackStyle.ButtonCustom2:
case PaletteBackStyle.ButtonCustom3:
case PaletteBackStyle.ButtonInputControl:
case PaletteBackStyle.ContextMenuItemHighlight:
switch (state)
{
case PaletteState.Disabled:
return _buttonBackColors[1];
case PaletteState.Normal:
if (style == PaletteBackStyle.ButtonNavigatorStack)
return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalNavigatorBack2];
else if (style == PaletteBackStyle.ButtonNavigatorMini)
return _ribbonColors[(int)SchemeOfficeColors.NavigatorMiniBackColor];
else if (style == PaletteBackStyle.ButtonCluster)
return _ribbonColors[(int)SchemeOfficeColors.ButtonClusterButtonBack2];
else
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:
if (style == PaletteBackStyle.ButtonAlternate)
return _ribbonColors[(int)SchemeOfficeColors.AlternatePressedBack2];
else
return _buttonBackColors[5];
case PaletteState.CheckedTracking:
if (style == PaletteBackStyle.ButtonInputControl)
return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
else
return _buttonBackColors[9];
default:
throw new ArgumentOutOfRangeException("state");
}
default:
throw new ArgumentOutOfRangeException("style");
}
}