dashboard-devexpress-dot-dashboardwin-dot-customcontrolproviderbase-dot-getprintablecontrol-x28-devexpress-dot-dashboardcommon-dot-customitemdata-devexpress-dot-dashboardcommon-dot-customitemexportinfo-x29.md
Gets a printable control corresponding to the specified custom dashboard item.
Namespace : DevExpress.DashboardWin
Assembly : DevExpress.Dashboard.v25.2.Win.dll
NuGet Package : DevExpress.Win.Dashboard
protected virtual XRControl GetPrintableControl(
CustomItemData customItemData,
CustomItemExportInfo exportInfo
)
Protected Overridable Function GetPrintableControl(
customItemData As CustomItemData,
exportInfo As CustomItemExportInfo
) As XRControl
| Name | Type | Description |
|---|---|---|
| customItemData | CustomItemData |
An object that contains methods to work with custom item data
| | exportInfo | CustomItemExportInfo |
An object that contains custom item export settings.
|
| Type | Description |
|---|---|
| XRControl |
A printable control corresponding to the specified custom dashboard item.
|
Dashboard uses the Reporting framework to export dashboard layout and data. You can use native report XRControls to export custom items. The following code snippet uses the GetPrintableControl method to export the custom Funnel item:
using DevExpress.XtraReports.UI;
using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
//...
public class CustomFunnelControlProvider : CustomControlProviderBase{
//...
protected override XRControl GetPrintableControl(CustomItemData customItemData, CustomItemExportInfo info) {
PrintableComponentContainer container = new PrintableComponentContainer();
container.PrintableComponent = chart;
return container;
}
}
Imports DevExpress.XtraReports.UI
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardWin
'...
Public Class CustomFunnelControlProvider
Inherits CustomControlProviderBase
'...
Protected Overrides Function GetPrintableControl(ByVal customItemData As CustomItemData, ByVal info As CustomItemExportInfo) As XRControl
Dim container As New PrintableComponentContainer()
container.PrintableComponent = chart
Return container
End Function
End Class
If you use a third-party control that does not have native support for our Printing Library, you can export it as an image instead.
See Also
CustomControlProviderBase Class