共用方式為


ConversionHelpers.ToColor(Object) Method

Definition

Converts value to a Color.

public static System.Windows.Media.Color? ToColor (object value);
static member ToColor : obj -> Nullable<System.Windows.Media.Color>
Public Shared Function ToColor (value As Object) As Nullable(Of Color)

Parameters

value
Object

The value to convert. The value to convert. It can be one of the following types:

    Returns

    The converted color, or null if value cannot be converted to a Color.

    Applies to