Stimulsoft Reports.Wpf 教程:使用自定义折叠图像

此示例显示如何将查看器Viewer中的图像标准折叠更改为自定义Custom。

此示例显示如何将查看器Viewer中的图像标准折叠更改为自定义Custom。为此,您可以使用StiOptions静态类。它包含一系列Stimulsoft Reports的选项。要更改折叠图像,请将UseCustomCollapsingImages选项设置为true,然后使用CollapsedImagePath和ExpandedImagePath选项设置自定义图像的路径。完成这些操作后,您可以在Viewer中显示 表:

public Window1(){    StiOptions.Wpf.CurrentTheme = StiOptions.Wpf.Themes.Office2013Theme;    StiOptions.Wpf.Viewer.CollapsingImages.UseCustomCollapsingImages = true;    StiOptions.Wpf.Viewer.CollapsingImages.CollapsedImagePath =         "pack://application:,,,/CustomCollapsingImages;component/Images/Collapsed.png";    StiOptions.Wpf.Viewer.CollapsingImages.ExpandedImagePath =         "pack://application:,,,/CustomCollapsingImages;component/Images/Expanded.png";     InitializeComponent();    StiReport report = new StiReport();      DataSet ds = new DataSet();    ds.ReadXmlSchema("..\..\Data\Demo.xsd");    ds.ReadXml("..\..\Data\Demo.xml");    ds.DataSetName = "Demo";     report.Load("..\DrillDownGroupWithCollapsing.mrt");    report.RegData(ds);     report.Compile();    report.Render(false);    viewer.Report = report;}

在下面的屏幕截图中,您可以看到示例代码的结果。

Stimulsoft Reports.Wpf 教程:使用自定义折叠图像

下载示例

购买Stimulsoft正版授权,请点击“咨询在线客服”!

标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年6月19日
下一篇 2019年6月19日

相关推荐

发表回复

登录后才能评论