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;
}
default:
return Color.Empty;
}
}
switch (style)
{
case PaletteContentStyle.HeaderForm:
if (state == PaletteState.Disabled)
return _ribbonColors[(int)SchemeOfficeColors.FormHeaderShortInactive];
else
return _ribbonColors[(int)SchemeOfficeColors.FormHeaderShortActive];
}
if ((state == PaletteState.Disabled) &&
(style != PaletteContentStyle.LabelToolTip) &&
(style != PaletteContentStyle.LabelSuperTip) &&
(style != PaletteContentStyle.LabelKeyTip) &&
(style != PaletteContentStyle.InputControlStandalone) &&
(style != PaletteContentStyle.InputControlRibbon) &&
(style != PaletteContentStyle.InputControlCustom1) &&
(style != PaletteContentStyle.ButtonInputControl) &&
(style != PaletteContentStyle.ButtonCalendarDay))
return _disabledText;
switch (style)
{
case PaletteContentStyle.GridHeaderColumnList:
case PaletteContentStyle.GridHeaderColumnSheet:
case PaletteContentStyle.GridHeaderColumnCustom1:
case PaletteContentStyle.GridHeaderRowList:
case PaletteContentStyle.GridHeaderRowSheet:
case PaletteContentStyle.GridHeaderRowCustom1:
case PaletteContentStyle.GridDataCellList:
case PaletteContentStyle.GridDataCellSheet:
case PaletteContentStyle.GridDataCellCustom1:
case PaletteContentStyle.HeaderCalendar:
return _gridTextColor;
case PaletteContentStyle.HeaderPrimary:
case PaletteContentStyle.HeaderDockInactive:
case PaletteContentStyle.HeaderSecondary:
case PaletteContentStyle.HeaderCustom1:
case PaletteContentStyle.HeaderCustom2:
return _ribbonColors[(int)SchemeOfficeColors.HeaderText];
case PaletteContentStyle.HeaderDockActive:
return Color.Black;
case PaletteContentStyle.InputControlStandalone:
case PaletteContentStyle.InputControlRibbon:
case PaletteContentStyle.InputControlCustom1:
if (state == PaletteState.Disabled)
return _ribbonColors[(int)SchemeOfficeColors.InputControlTextDisabled];
else
return _ribbonColors[(int)SchemeOfficeColors.InputControlTextNormal];
case PaletteContentStyle.LabelNormalPanel:
case PaletteContentStyle.LabelBoldPanel:
case PaletteContentStyle.LabelItalicPanel:
case PaletteContentStyle.LabelTitlePanel:
case PaletteContentStyle.LabelGroupBoxCaption:
return _ribbonColors[(int)SchemeOfficeColors.TextLabelPanel];
case PaletteContentStyle.LabelNormalControl:
case PaletteContentStyle.LabelBoldControl:
case PaletteContentStyle.LabelItalicControl:
case PaletteContentStyle.LabelTitleControl:
case PaletteContentStyle.LabelCustom1:
case PaletteContentStyle.LabelCustom2:
case PaletteContentStyle.LabelCustom3:
case PaletteContentStyle.ContextMenuItemImage:
case PaletteContentStyle.ContextMenuItemTextStandard:
case PaletteContentStyle.ContextMenuItemShortcutText:
case PaletteContentStyle.ContextMenuItemTextAlternate:
return _ribbonColors[(int)SchemeOfficeColors.TextLabelControl];
case PaletteContentStyle.LabelToolTip:
case PaletteContentStyle.LabelSuperTip:
case PaletteContentStyle.LabelKeyTip:
return _toolTipText;
case PaletteContentStyle.ContextMenuHeading:
return _ribbonColors[(int)SchemeOfficeColors.ContextMenuHeadingText];
case PaletteContentStyle.TabHighProfile:
case PaletteContentStyle.TabStandardProfile:
case PaletteContentStyle.TabLowProfile:
case PaletteContentStyle.TabOneNote:
case PaletteContentStyle.TabDock:
case PaletteContentStyle.TabCustom1:
case PaletteContentStyle.TabCustom2:
case PaletteContentStyle.TabCustom3:
case PaletteContentStyle.ButtonStandalone:
case PaletteContentStyle.ButtonGallery:
case PaletteContentStyle.ButtonAlternate:
case PaletteContentStyle.ButtonCluster:
case PaletteContentStyle.ButtonCustom1:
case PaletteContentStyle.ButtonCustom2:
case PaletteContentStyle.ButtonCustom3:
if (state != PaletteState.Normal)
return _ribbonColors[(int)SchemeOfficeColors.TextButtonChecked];
else
return _ribbonColors[(int)SchemeOfficeColors.TextButtonNormal];
case PaletteContentStyle.TabDockAutoHidden:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonNormal];
case PaletteContentStyle.ButtonCalendarDay:
if (state == PaletteState.Disabled)
return _disabledText2;
else
return Color.Black;
case PaletteContentStyle.ButtonListItem:
case PaletteContentStyle.ButtonCommand:
case PaletteContentStyle.ButtonLowProfile:
case PaletteContentStyle.ButtonBreadCrumb:
case PaletteContentStyle.ButtonButtonSpec:
switch (state)
{
case PaletteState.Normal:
if (style == PaletteContentStyle.ButtonListItem)
return _ribbonColors[(int)SchemeOfficeColors.TextLabelControl];
else
return _ribbonColors[(int)SchemeOfficeColors.TextLabelPanel];
case PaletteState.CheckedNormal:
case PaletteState.CheckedTracking:
case PaletteState.CheckedPressed:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonChecked];
default:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonNormal];
}
case PaletteContentStyle.ButtonForm:
case PaletteContentStyle.ButtonFormClose:
switch (state)
{
case PaletteState.Tracking:
case PaletteState.CheckedTracking:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonFormTracking];
case PaletteState.Pressed:
case PaletteState.CheckedPressed:
case PaletteState.CheckedNormal:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonFormPressed];
default:
return _ribbonColors[(int)SchemeOfficeColors.TextButtonFormNormal];
}
case PaletteContentStyle.ButtonInputControl:
if (state != PaletteState.Disabled)
return _ribbonColors[(int)SchemeOfficeColors.InputDropDownNormal1];
else
return _ribbonColors[(int)SchemeOfficeColors.InputDropDownDisabled1];
case PaletteContentStyle.ButtonNavigatorMini:
case PaletteContentStyle.ButtonNavigatorStack:
case PaletteContentStyle.ButtonNavigatorOverflow:
if (state != PaletteState.Normal)
return _ribbonColors[(int)SchemeOfficeColors.ButtonNavigatorText];
else
return _ribbonColors[(int)SchemeOfficeColors.TextButtonNormal];
default:
throw new ArgumentOutOfRangeException("style");
}
}