Back to Devexpress

EmptyDataItemPlaceholderAttribute Class

dashboard-devexpress-dot-dashboardcommon-0af0bb79.md

latest3.8 KB
Original Source

EmptyDataItemPlaceholderAttribute Class

Specifies placeholder text for a pane where you can place a data item.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
[AttributeUsage(AttributeTargets.Property)]
public class EmptyDataItemPlaceholderAttribute :
    Attribute
vb
<AttributeUsage(AttributeTargets.Property)>
Public Class EmptyDataItemPlaceholderAttribute
    Inherits Attribute

Remarks

You can apply EmptyDataItemPlaceholderAttribute to a data section when you create metadata for a custom dashboard item. The attribute specifies placeholder text for a pane where you can place a data item. For this, pass a string value as an argument to the EmptyDataItemPlaceholderAttribute constructor.

The following code snippet specifies names of empty placeholders in the Value and Arguments data sections:

csharp
using System.ComponentModel;
using DevExpress.DashboardCommon;

namespace CustomItemsSample {
  [DisplayName("Funnel"),
  CustomItemDescription("Funnel description"),
  CustomItemImage("CustomItemsSample.Images.Funnel.svg")]
  public class CustomFunnelMetadata : CustomItemMetadata{
     [DisplayName("Value"),
      EmptyDataItemPlaceholder("Value"),
      SupportColoring(DefaultColoringMode.Hue)]
      public Measure Value {
          get { return GetPropertyValue<Measure>(); }
          set { SetPropertyValue(value); }
      }
      [DisplayName("Arguments"),
      EmptyDataItemPlaceholder("Argument"),
      SupportColoring(DefaultColoringMode.Hue),
      SupportInteractivity]
      public DimensionCollection Arguments { get; } = new DimensionCollection();
  }
}
vb
Imports System.ComponentModel
Imports DevExpress.DashboardCommon

Namespace CustomItemsSample
  <DisplayName("Funnel"), CustomItemDescription("Funnel description"), CustomItemImage("Funnel.svg")>
  Public Class CustomFunnelMetadata
      Inherits CustomItemMetadata
      <DisplayName("Value"), EmptyDataItemPlaceholder("Value"), SupportColoring(DefaultColoringMode.Hue)>
      Public Property Value() As Measure
          Get
              Return GetPropertyValue(Of Measure)()
          End Get
          Set(ByVal value As Measure)
              SetPropertyValue(value)
          End Set
      End Property
      <DisplayName("Arguments"), EmptyDataItemPlaceholder("Argument"), SupportColoring(DefaultColoringMode.Hue), SupportInteractivity>
      Public ReadOnly Property Arguments() As New DimensionCollection()
  End Class
End Namespace

The “Argument” and “Value” names appear as placeholders in the Argument and Value data sections, respectively.

Inheritance

Object Attribute EmptyDataItemPlaceholderAttribute

See Also

EmptyDataItemPlaceholderAttribute Members

CustomItemMetadata

DevExpress.DashboardCommon Namespace