dashboard-devexpress-dot-dashboardcommon-dot-customitemmetadatatypes-dot-register-1.md
Adds a metadata type to the CustomItemMetadataTypes collection.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public void Register<T>()
where T : CustomItemMetadata
Public Sub Register(Of T As CustomItemMetadata)
| Name | Description |
|---|---|
| T |
A CustomItemMetadata object.
|
Pass a new metadata type to the Register<T>() method. You should call the method before the main application form is created. The following code snippet shows how to register the CustomFunnelMetadata metadata type:
using DevExpress.XtraEditors;
using System;
using System.Windows.Forms;
using DevExpress.DashboardCommon;
namespace CustomItemsSample {
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
//...
Dashboard.CustomItemMetadataTypes.Register<CustomFunnelMetadata>();
Application.Run(new Form1());
}
}
}
Imports DevExpress.XtraEditors
Imports System
Imports System.Windows.Forms
Imports DevExpress.DashboardCommon
Namespace CustomItemsSample
Friend NotInheritable Class Program
''' <summary>
''' The main entry point for the application.
''' </summary>
Private Sub New()
End Sub
<STAThread> _
Shared Sub Main()
'...
Dashboard.CustomItemMetadataTypes.Register(Of CustomFunnelMetadata)()
Application.Run(New Form1())
End Sub
End Class
End Namespace
The following code snippets (auto-collected from DevExpress Examples) contain references to the Register<T>() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-dashboard-custom-items-extension/CS/CustomItemTest/DesignerForm1.cs#L19
public DesignerForm1() {
Dashboard.CustomItemMetadataTypes.Register<SunburstItemMetadata>();
Dashboard.CustomItemMetadataTypes.Register<SankeyItemMetadata>();
winforms-dashboard-custom-items/CS/TutorialsCustomItems/Program.cs#L21
Application.SetCompatibleTextRenderingDefault(false);
Dashboard.CustomItemMetadataTypes.Register<HelloWorldItemMetadata>();
Dashboard.CustomItemMetadataTypes.Register<SimpleTableMetadata>();
winforms-dashboard-trend-line-indicators/CS/WinformsIndicator/Program.cs#L19
Application.SetCompatibleTextRenderingDefault(false);
Dashboard.CustomItemMetadataTypes.Register<SimpleTableMetadata>();
winforms-dashboard-custom-items-extension/VB/CustomItemTest/DesignerForm1.vb#L20
Public Sub New()
Dashboard.CustomItemMetadataTypes.Register(Of SunburstItemMetadata)()
Dashboard.CustomItemMetadataTypes.Register(Of SankeyItemMetadata)()
winforms-dashboard-custom-items/VB/TutorialsCustomItems/Program.vb#L18
Application.SetCompatibleTextRenderingDefault(False)
Dashboard.CustomItemMetadataTypes.Register(Of HelloWorldItemMetadata)()
Dashboard.CustomItemMetadataTypes.Register(Of SimpleTableMetadata)()
winforms-dashboard-trend-line-indicators/VB/WinformsIndicator/Program.vb#L19
Application.SetCompatibleTextRenderingDefault(False)
Dashboard.CustomItemMetadataTypes.Register(Of SimpleTableMetadata)()
See Also