public override Color GetContentShortTextColor1(PaletteContentStyle style, PaletteState state)
{
// Always work out value for an override state
if (CommonHelper.IsOverrideState(state))
{
switch (style)
{
case PaletteContentStyle.LabelNormalControl:
case PaletteContentStyle.LabelBoldControl:
case PaletteContentStyle.LabelItalicControl:
case PaletteContentStyle.LabelTitleControl:
switch (state)
{
case PaletteState.LinkNotVisitedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkNotVisitedOverrideControl];
case PaletteState.LinkVisitedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkVisitedOverrideControl];
case PaletteState.LinkPressedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkPressedOverrideControl];
default:
// All other override states do nothing
return Color.Empty;
}
case PaletteContentStyle.LabelNormalPanel:
case PaletteContentStyle.LabelBoldPanel:
case PaletteContentStyle.LabelItalicPanel:
case PaletteContentStyle.LabelTitlePanel:
case PaletteContentStyle.LabelGroupBoxCaption:
switch (state)
{
case PaletteState.LinkNotVisitedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkNotVisitedOverridePanel];
case PaletteState.LinkVisitedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkVisitedOverridePanel];
case PaletteState.LinkPressedOverride:
return _ribbonColors[(int)SchemeOfficeColors.LinkPressedOverridePanel];
default:
// All other override states do nothing
return Color.Empty;
}
}
return Color.Empty;
}
switch (style)
{
case PaletteContentStyle.HeaderForm:
if (state == PaletteState.Disabled)
return _disabledText;
else
return _colorWhite255;
}
if ((state == PaletteState.Disabled) &&
(style != PaletteContentStyle.LabelToolTip) &&
(style != PaletteContentStyle.LabelSuperTip) &&
(style != PaletteContentStyle.LabelKeyTip) &&
(style != PaletteContentStyle.InputControlStandalone) &&
(style != PaletteContentStyle.InputControlRibbon) &&
(style != PaletteContentStyle.InputControlCustom1) &&
(style != PaletteContentStyle.ButtonCalendarDay))
return _disabledText;
switch (style)
{
case PaletteContentStyle.LabelNormalControl:
case PaletteContentStyle.LabelBoldControl:
case PaletteContentStyle.LabelItalicControl:
case PaletteContentStyle.LabelTitleControl:
case PaletteContentStyle.LabelCustom1:
case PaletteContentStyle.LabelCustom2:
case PaletteContentStyle.LabelCustom3:
case PaletteContentStyle.LabelToolTip:
case PaletteContentStyle.LabelSuperTip:
case PaletteContentStyle.LabelKeyTip:
case PaletteContentStyle.ContextMenuItemImage:
case PaletteContentStyle.ContextMenuItemTextStandard:
case PaletteContentStyle.ContextMenuItemShortcutText:
case PaletteContentStyle.ContextMenuItemTextAlternate:
return _colorDark00;
case PaletteContentStyle.ButtonListItem:
case PaletteContentStyle.ButtonCommand:
switch (state)
{
case PaletteState.Disabled:
case PaletteState.Normal:
case PaletteState.NormalDefaultOverride:
case PaletteState.Tracking:
return _colorDark00;
default:
return _colorWhite255;
}
case PaletteContentStyle.ButtonStandalone:
case PaletteContentStyle.ButtonAlternate:
case PaletteContentStyle.ButtonGallery:
case PaletteContentStyle.ButtonCluster:
case PaletteContentStyle.ButtonBreadCrumb:
case PaletteContentStyle.ButtonNavigatorMini:
case PaletteContentStyle.ButtonNavigatorStack:
case PaletteContentStyle.ButtonNavigatorOverflow:
case PaletteContentStyle.ButtonCustom1:
case PaletteContentStyle.ButtonCustom2:
case PaletteContentStyle.ButtonCustom3:
case PaletteContentStyle.HeaderPrimary:
case PaletteContentStyle.HeaderDockInactive:
case PaletteContentStyle.HeaderDockActive:
case PaletteContentStyle.HeaderCalendar:
case PaletteContentStyle.HeaderSecondary:
case PaletteContentStyle.HeaderCustom1:
case PaletteContentStyle.HeaderCustom2:
case PaletteContentStyle.LabelNormalPanel:
case PaletteContentStyle.LabelBoldPanel:
case PaletteContentStyle.LabelItalicPanel:
case PaletteContentStyle.LabelTitlePanel:
case PaletteContentStyle.LabelGroupBoxCaption:
case PaletteContentStyle.ContextMenuHeading:
return _colorWhite255;
case PaletteContentStyle.ButtonCalendarDay:
switch (state)
{
case PaletteState.Disabled:
return _colorWhite128;
case PaletteState.CheckedNormal:
case PaletteState.CheckedTracking:
case PaletteState.FocusOverride:
return _colorWhite255;
default:
return _colorDark00;
}
case PaletteContentStyle.ButtonForm:
case PaletteContentStyle.ButtonFormClose:
case PaletteContentStyle.ButtonLowProfile:
case PaletteContentStyle.ButtonInputControl:
if ((state == PaletteState.Normal) ||
(state == PaletteState.NormalDefaultOverride))
return _colorDark00;
else
return _colorWhite255;
case PaletteContentStyle.ButtonButtonSpec:
return _colorWhite255;
case PaletteContentStyle.GridDataCellList:
case PaletteContentStyle.GridDataCellSheet:
case PaletteContentStyle.GridDataCellCustom1:
if (state == PaletteState.CheckedNormal)
return _colorWhite255;
else
return _colorDark00;
case PaletteContentStyle.GridHeaderColumnSheet:
case PaletteContentStyle.GridHeaderRowSheet:
if (state != PaletteState.Pressed)
return _colorDark00;
else
return _colorWhite255;
case PaletteContentStyle.GridHeaderColumnList:
case PaletteContentStyle.GridHeaderColumnCustom1:
case PaletteContentStyle.GridHeaderRowList:
case PaletteContentStyle.GridHeaderRowCustom1:
return _colorDark00;
case PaletteContentStyle.InputControlStandalone:
case PaletteContentStyle.InputControlRibbon:
case PaletteContentStyle.InputControlCustom1:
if (state == PaletteState.Disabled)
return _inputControlTextDisabled;
else
return _colorDark00;
case PaletteContentStyle.TabHighProfile:
case PaletteContentStyle.TabStandardProfile:
case PaletteContentStyle.TabOneNote:
case PaletteContentStyle.TabDock:
case PaletteContentStyle.TabCustom1:
case PaletteContentStyle.TabCustom2:
case PaletteContentStyle.TabCustom3:
switch (state)
{
case PaletteState.Disabled:
return _disabledText;
case PaletteState.CheckedNormal:
case PaletteState.CheckedTracking:
case PaletteState.CheckedPressed:
case PaletteState.FocusOverride:
return _colorDark00;
default:
return _sparkleColors[4];
}
case PaletteContentStyle.TabDockAutoHidden:
switch (state)
{
case PaletteState.Disabled:
return _disabledText;
case PaletteState.FocusOverride:
return _colorDark00;
default:
return _sparkleColors[4];
}
case PaletteContentStyle.TabLowProfile:
switch (state)
{
case PaletteState.Disabled:
return _disabledText;
case PaletteState.CheckedNormal:
case PaletteState.CheckedTracking:
case PaletteState.CheckedPressed:
case PaletteState.FocusOverride:
return _colorDark00;
default:
return _colorWhite255;
}
default:
throw new ArgumentOutOfRangeException("style");
}
}