[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Collapse]TreeMap Control
   [Expand]Getting Started
   [Expand]Providing Data
   [Expand]Layout Algorithms
   [Collapse]End-User Interaction
     Highlighting and Selection
     Printing and Exporting
   [Expand]Visual Elements
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Printing and Exporting

The TreeMap control allows you to print a treemap and export it to multiple file formats.

Make sure that your project references the DevExpress.Printing.v18.2.Core assembly to be capable to perform the following tasks.

Expanded Immediately Print a Treemap

To print a treemap by means of the system default printer without invoking any print dialogs, call the HierarchicalChartControlBase.Print method.

Expanded Print a Treemap Using the Standard Print Dialog

The system print dialog makes it possible to configure common print settings before printing. For instance, you can set the number of printed copies.

To show the system print dialog, use the HierarchicalChartControlBase.ShowPrintDialog method.

Expanded Invoke the Print Preview Dialog to Print/Export a Treemap

A treemap can be printed/exported with the Print Preview dialog. To invoke this dialog, use one of the following methods.

HierarchicalChartControlBase.ShowRibbonPrintPreview Creates a document to be printed and displays the Print Preview.
HierarchicalChartControlBase.ShowPrintPreview Creates a document to be printed and displays the Print Preview with the Ribbon.

The code below demonstrates how to invoke the Print Preview with the Ribbon.

To immediately print a treemap, select the Quick Print item in the Preview.

To show the standard system dialog before printing, select the Print item.

Select a format from the Export To item's drop-down list to export a treemap.

Expanded Export a Treemap from Code

The TreeMap control supports the capability to export a treemap to numerous file formats.

HierarchicalChartControlBase.ExportToImage Exports a treemap to an image file.
HierarchicalChartControlBase.ExportToMht Exports a treemap to an MHT file.
HierarchicalChartControlBase.ExportToPdf Exports a treemap to a PDF file.
HierarchicalChartControlBase.ExportToRtf Exports a treemap to an RTF file.
HierarchicalChartControlBase.ExportToXls Exports a treemap to an XLS file.
HierarchicalChartControlBase.ExportToXlsx Exports a treemap to an XLSX file.

The code below shows how to export a treemap to a PNG image.

Expanded See Also

Is this topic helpful?​​​​​​​