翻譯|使用教程|編輯:鄭恭琳|2019-07-22 10:22:41.380|閱讀 545 次
概述:此示例顯示如何將查看器Viewer中的圖像標準折疊更改為自定義Custom。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
此示例顯示如何將查看器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正版授權,請點擊“”!
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn