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 Class

    An icon from the DevExpress Icon Library.

    Namespace: DevExpress.IconLibrary

    Assembly: DevExpress.Data.v26.2.dll

    Declaration

    public class Icon

    The following members return Icon objects:

    Show 2533 links

    Remarks

    The DevExpress Icon Library ships with 2500+ icon metaphors. Icons are categorized by the following attributes:

    • Set: Fluent, DesktopClassic, BlazorClassic
    • Palette: Neutral, Colored
    • Size: 12, 16, 20, 24, 28, 32, 48

    Note

    Available combinations of palettes and sizes differ for individual icons.

    Icon properties override global/skin settings. Use an Icon class instance to preserve custom settings for an individual icon.

    Create an Icon

    1. Use static properties of the Icons class to obtain an icon from the DevExpress Icon Library.

    2. Customize icon properties.

    3. Assign the icon to a control’s ImageOptions.ImageUri property to display the icon with specified settings.

    The following code snippet assigns a Fluent icon to a button:

    using DevExpress.IconLibrary;
    // Step 1
    DevExpress.IconLibrary.Icon icon = Icons.Add;
    // Step 2
    icon.Set = IconSet.Fluent;
    icon.Size = IconSize.Size16;
    // Step 3
    simpleButton2.ImageOptions.ImageUri = icon;
    

    Note

    If you decide to use the Icon class constructor to create a new icon, make sure to use the “icon/“ prefix before the icon identifier to reference an SVG icon:

    using DevExpress.IconLibrary;
    
    DevExpress.IconLibrary.Icon icon = new Icon("icon/add");
    

    Inheritance

    Object
    Icon
    See Also