Skip to main content
All docs
V24.1

CustomItemImageAttribute Class

Specifies an icon for a custom item’s bar in the Ribbon.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.1.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

[AttributeUsage(AttributeTargets.Class)]
public class CustomItemImageAttribute :
    Attribute

Remarks

You can apply CustomItemImageAttribute to a CustomItemMetadata object when you create metadata for a custom dashboard item. The attribute identifies an icon for a custom item’s bar in the Ribbon. The file that is used for an icon must be embedded to an assembly where the file is located. Make sure the file’s Build Action property is set to Embedded Resource.

The way in which you can specify an icon depends on the icon file’s location:

  • The icon is located in the same assembly where the CustomItemMetadata object is defined.

    Pass a path to the file as an argument to the CustomItemImageAttribute constructor.

    using DevExpress.DashboardCommon;
    
    namespace CustomItemsSample {
      [CustomItemImage("CustomItemsSample.Images.Funnel.svg")]
      public class CustomFunnelMetadata : CustomItemMetadata {
        //...
      }
    }
    
  • The icon is located in another assembly.

    To identify another assembly, pass both a path to the file and any class type from the assembly where the file is located to the CustomItemImageAttribute constructor.

    using DevExpress.DashboardCommon;
    
    namespace CustomItemsSample {
      [CustomItemImage("CustomImages.Images.CustomItemImage.svg", typeof(CustomerType))]
      public class CustomFunnelMetadata : CustomItemMetadata {
        //...
      }
    }
    

Inheritance

Object
Attribute
CustomItemImageAttribute
See Also