| ThemeHelperParseColor Method |
Converts the specified string representation of a color to its
Color
equivalent, or throws an exception if the string cannot be converted to a
Color.
Namespace: DigitalRune.Game.UI.RenderingAssembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax public static Color ParseColor(
string value,
Color defaultColor
)
Public Shared Function ParseColor (
value As String,
defaultColor As Color
) As Color
public:
static Color ParseColor(
String^ value,
Color defaultColor
)
static member ParseColor :
value : string *
defaultColor : Color -> Color
Parameters
- value
- Type: SystemString
The value. If this value is or an empty string, the
defaultColor is returned.
- defaultColor
- Type: Color
The default color that is used for empty strings.
Return Value
Type:
ColorThe
Color.
Exceptions See Also