The API related to the customization of the DocumentViewer dropdown icons has been changed:
- The PrintPreviewGalleryItem.SmallImage property can now be set.
- The PrintPreviewGalleryDropDownBase.Items property is now marked public and this affects all the class descendants:
- PrintPreviewPaperSizeGalleryDropDown - PrintingSystemCommand.PaperSize
- PrintPreviewPageOrientationGalleryDropDown - PrintingSystemCommand.PageOrientation
- PrintPreviewPageMarginsGalleryDropDown - PrintingSystemCommand.PageMargins
- PrintPreviewExportGalleryDropDown - PrintingSystemCommand.ExportFile
- PrintPreviewExportGalleryDropDown - PrintingSystemCommand.SendFile
In case the dropdown icons are customized after the document creation, it is necessary to get a gallery dropdown item, and change its Glyph and LargeGlyph properties in the following manner:
C#...
XtraReport1 report = new XtraReport1();
documentViewer1.DocumentSource = report;
report.CreateDocument();
BarItem item = documentViewerRibbonController1.GetBarItemByCommand(PrintingSystemCommand.ExportFile);
item.Glyph = Image.FromFile("Images/Glyph.png");
item.LargeGlyph = Image.FromFile("Images/Large_Glyph.png");
PrintPreviewExportGalleryDropDown control = (PrintPreviewExportGalleryDropDown)((BarButtonItem)(item)).DropDownControl;
PrintPreviewGalleryItem[] items = control.Items;
...
Alternatively, the icon of a gallery dropdown item will be automatically set to the first item from its dropdown list.