ComponentFactory.Krypton.Toolkit.ButtonSpec.GetImageTransparentColor C# (CSharp) Method

GetImageTransparentColor() public method

Gets the image transparent color.
public GetImageTransparentColor ( IPalette palette ) : Color
palette IPalette Palette to use for inheriting values.
return Color
        public virtual Color GetImageTransparentColor(IPalette palette)
        {
            if (KryptonCommand != null)
                return KryptonCommand.ImageTransparentColor;
            else if (ImageTransparentColor != Color.Empty)
                return ImageTransparentColor;
            else
                return palette.GetButtonSpecImageTransparentColor(_type);
        }

Usage Example

Esempio n. 1
0
 /// <summary>
 /// Gets the content image transparent color.
 /// </summary>
 /// <param name="state">The state for which the image color is needed.</param>
 /// <returns>Color value.</returns>
 public Color GetImageTransparentColor(PaletteState state)
 {
     // Get value from button spec passing inheritence redirector
     return(_buttonSpec.GetImageTransparentColor(_redirector));
 }