Skip to main content
All docs
V24.1

CustomItemMetadata.SetCustomPropertyValue<T>(T, String) Method

Applies a custom property value.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

protected void SetCustomPropertyValue<T>(
    T value,
    string propertyName = null
)

Parameters

Name Type Description
value T

A custom property value.

Optional Parameters

Name Type Default Description
propertyName String null

The custom property name from CustomItemMetadata.

Type Parameters

Name Description
T

A custom property data type.

Remarks

The following code snippet shows how to declare a custom ShowLegend property in the CustomItemMetadata descendant:

using DevExpress.DashboardCommon;

namespace TutorialsCustomItems {
    public class FunnelItemMetadata : CustomItemMetadata {
        // ...
        [ShowLegendCustom]
        public bool ShowLegend {
            get { return GetCustomPropertyValue<bool>(); }
            set { SetCustomPropertyValue(value); }
        }
    }
}
See Also