# GrapeCity.ActiveReports.Viewer.Win.Viewer.Toolbar

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Toolbar_" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Toolbar*">Toolbar Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Toolbar_" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Toolbar*"></a>
<h4 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Toolbar" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Toolbar">Toolbar</h4>
<div class="markdown level1 summary"><p>Provides access to the viewer's toolbar, allowing for customization and control of toolbar buttons and functionality.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Viewer.ViewerToolbar Toolbar { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.Viewer.html">Viewer</a>.<a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.Viewer.ViewerToolbar.html">ViewerToolbar</a></td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.Viewer.ViewerToolbar.html">Viewer.ViewerToolbar</a> instance that represents the toolbar in the viewer.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Toolbar_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The toolbar is a key component of the viewer's user interface, offering quick access to common actions such as navigation, zoom, and print.
This property allows developers to customize the toolbar to better suit their application's needs.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Toolbar_examples">Examples</h5>
<pre><code class="lang-csharp">public void AddCustomButtonToViewerToolbar(Viewer viewer)
{
	// Create a new ToolStripButton
	var customButton = new ToolStripButton
	{
	    Name = "customButton",
	    Text = "Custom Action"
	};
	customButton.Click += CustomButton_Click;
	// Add the button to the Viewer's ToolStrip
	viewer.Toolbar.ToolStrip.Items.Add(customButton);
}
private void CustomButton_Click(object sender, EventArgs e)
{
	// Custom action
	MessageBox.Show("Custom action executed.");
}
public void RemoveButtonFromViewerToolbar(Viewer viewer, string buttonName)
{
	var item = viewer.Toolbar.ToolStrip.Items[buttonName];
	if (item != null)
	{
	    viewer.Toolbar.ToolStrip.Items.Remove(item);
	}
}</code></pre>

</div>
