Skip to main content
A newer version of this page is available. .

Customize Print Appearances

Customize Print Appearances

By default, when a Tree List is printed/exported, it has the same appearance as when it’s displayed onscreen (these appearance settings can be accessed via the TreeList.Appearance property). However, the Tree List also provides print appearances, which can be used to paint its visual elements (buttons, headers, cells, etc.) when the Tree List is printed and exported. To use the print appearances when the Tree List is printed/exported, set the TreeListOptionsPrint.UsePrintStyles option to true, and then use the TreeList.AppearancePrint property to access and customize the print appearances.

The print appearances can be customized using the Print Appearances page of the Tree List Designer.

designerPrintAppearances

Example

The following sample code shows how to enable the print appearances and customize the background color of even nodes via the TreeList.AppearancePrint property.

The image below shows the result.

Printing - ModifiedStyles

treeList1.OptionsPrint.UsePrintStyles = true;
treeList1.AppearancePrint.EvenRow.BackColor = Color.FromArgb(255, 192, 128);