/// <summary> /// Gets the color to use in place of the image map color. /// </summary> /// <param name="style">Content style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetContentImageColorTo(PaletteContentStyle style, PaletteState state) { // If allowed to override then get the map color Color mapColor = OverrideImageColor(state); // If mapping occuring then return the target remap color if ((mapColor != Color.Empty) && (PaletteContent != null)) { PaletteState getState = PaletteState; // Honor the button disabled state if (state == PaletteState.Disabled) { getState = PaletteState.Disabled; } return(PaletteContent.GetContentShortTextColor1(getState)); } else { return(base.GetContentImageColorTo(style, state)); } }
/// <summary> /// Gets the first back color for the long text. /// </summary> /// <param name="style">Content style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetContentLongTextColor1(PaletteContentStyle style, PaletteState state) => // Do we need to override the text color OverrideTextColor(state) && (PaletteContent != null) ? PaletteContent.GetContentShortTextColor1(state) : base.GetContentLongTextColor1(style, state);