Table of Contents

Method GetColorOrDefault

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

GetColorOrDefault(string, Func<Color>)

Returns a color by its name or a result of defaultFunc call if no color is registered for the specified name.

public static Color GetColorOrDefault(string name, Func<Color> defaultFunc)

Parameters

name string
defaultFunc Func<Color>

Returns

Color

GetColorOrDefault(string, Color)

Returns a color by its name or defaultValue if no color is registered for the specified name.

public static Color GetColorOrDefault(string name, Color defaultValue)

Parameters

name string
defaultValue Color

Returns

Color