回复 1楼mm640803的帖子
Spread for Silverlight 版本无法实现打印预览功能。
WPF 有一种工程模式为WPF XAML Browser Applications,具体使用方法您可以通过链接了解下: http://msdn.microsoft.com/en-us/library/aa970060(v=vs.110).aspx
Spread WPF 打印预览功能代码如下:
- GcSpreadSheet1.SheetCount = 3;
- GcSpreadSheet1.Sheets[0].SetText(0, 0, "test");
- GcSpreadSheet1.Sheets[1].SetText(0, 0, "Page test");
- GcSpreadSheet1.Sheets[2].SetText(0, 0, "Page 3 test");
- GrapeCity.Windows.SpreadSheet.Data.PrintInfo printset = new GrapeCity.Windows.SpreadSheet.Data.PrintInfo();
- printset.ShowBorder = true;
- printset.ShowColumnHeader = GrapeCity.Windows.SpreadSheet.Data.VisibilityType.Show;
- printset.ShowRowHeader = GrapeCity.Windows.SpreadSheet.Data.VisibilityType.Show;
- printset.ShowGridLine = true;
- printset.FooterCenter = "This is Page &P";
- GcSpreadSheet1.Sheets[0].PrintInfo = printset;
- GcSpreadSheet1.PrintPreview();
复制代码
谢谢 |