ICustomPropertyHistoryAttribute<T>.GetHistoryMessage(T, T, String) Method
Returns the message displayed in the Dashboard Designer’s history when a user changes a custom property value.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v24.2.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
newValue | T | A new custom property’s value. |
oldValue | T | A previous custom property’s value. |
dashboardItemName | String | A custom dashboard item’s component name. |
Returns
Type | Description |
---|---|
String | The message displayed in the Dashboard Designer’s history |
Remarks
The following code snippet specifies the history message for the ShowLegend
custom property:
using DevExpress.DashboardCommon;
using System.ComponentModel;
namespace TutorialsCustomItems {
public class FunnelItemMetadata : CustomItemMetadata {
// ...
[ShowLegendCustom]
public bool ShowLegend {
get { return GetCustomPropertyValue<bool>(); }
set { SetCustomPropertyValue(value); }
}
public class ShowLegendCustomAttribute : Attribute, ICustomPropertyValueConverterAttribute<bool>, ICustomPropertyHistoryAttribute<bool>{
// ...
public string GetHistoryMessage(bool newValue, bool oldValue, string dashboardItemName){
return (newValue ? "Enable" : "Disable") + " Legend for the " + dashboardItemName;
}
}
}
}
See Also