Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V26.2
  • Icon.TryParse(String, out Icon) Method

    Converts the string representation of an icon to an Icon object. A return value indicates whether the conversion succeeded.

    Namespace: DevExpress.IconLibrary

    Assembly: DevExpress.Data.v26.2.dll

    Declaration

    public static bool TryParse(
        string value,
        out Icon icon
    )

    Parameters

    Name Type Description
    value String

    The string representation of the icon (for example, “icon/add;Fluent;Size16”).

    icon Icon

    The icon that corresponds to the specified string or null (if the conversion failed).

    Returns

    Type Description
    Boolean

    true if the string was converted successfully; otherwise, false.

    Remarks

    The string contains the icon identifier followed by property values separated by semicolons. Property values are IconSet, IconPalette, and/or IconSize enumeration members.

    To compose a string, specify the icon identifier first. Property values specified after the identifier are case-insensitive, optional, and their order is arbitrary. Omitted settings are set to Default.

    // Example string
    
    "icon/add;Fluent;Size16"
    
    See Also