Adding button to toolbar v2015.3
Posted: Wed May 23, 2018 11:50 pm
How can I add a button to the preview windows toolbar? I can't find StiStandardToolbarService stdToolbar = StiStandardToolbarService.GetService() anywhere
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
https://forum.stimulsoft.com/
Code: Select all
private void AddExportButton()
{
var exportButton = new ButtonItem
{
Text = "Export...",
Name = "exportButton",
BeginGroup = true
};
exportButton.Shortcuts.Add(eShortcut.CtrlE);
exportButton.Click += (s,e) =>
{
using (var exportDialog = new ReportExportDialog())
{
exportDialog.StartPosition = FormStartPosition.CenterParent;
exportDialog.ShowDialog();
}
};
viewerControl.ToolBar.Items.Insert(1, exportButton);
}