# GrapeCity.ActiveReports.Viewer.Wpf.Viewer.Action

## Content

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




<h1 id="GrapeCity_ActiveReports_Viewer_Wpf_Viewer_Action" data-uid="GrapeCity.ActiveReports.Viewer.Wpf.Viewer.Action" class="text-break">Action Event
</h1>
<div class="markdown level0 summary"><p>Occurs when an action is performed on the document in the viewer.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.ActiveReports.Viewer.Wpf.html">GrapeCity.ActiveReports.Viewer.Wpf</a></h6>
<h6><strong>Assembly</strong>: MESCIUS.ActiveReports.Viewer.Wpf.dll</h6>
<h5 id="GrapeCity_ActiveReports_Viewer_Wpf_Viewer_Action_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event EventHandler&lt;Viewer.ActionEventArgs&gt; Action</code></pre>
</div>
<h5 class="returns">Returns</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="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a>&lt;<a class="xref" href="GrapeCity.ActiveReports.Viewer.Wpf.Viewer.html">Viewer</a>.<a class="xref" href="GrapeCity.ActiveReports.Viewer.Wpf.Viewer.ActionEventArgs.html">ActionEventArgs</a>&gt;</td>
      <td>Occurs when an action is performed on the document in the viewer.</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Viewer_Wpf_Viewer_Action_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>This event is triggered for following type actions:</p>
<ul><li><a class="xref" href="../MESCIUS.ActiveReports.Viewer.Common/GrapeCity.Viewer.Common.Model.Interactivity.HyperlinkAction.html">HyperlinkAction</a></li><li><a class="xref" href="../MESCIUS.ActiveReports.Viewer.Common/GrapeCity.Viewer.Common.Model.Interactivity.BookmarkAction.html">BookmarkAction</a></li><li><a class="xref" href="../MESCIUS.ActiveReports.Viewer.Common/GrapeCity.Viewer.Common.Model.Interactivity.DrillthroughAction.html">DrillthroughAction</a></li><li><a class="xref" href="../MESCIUS.ActiveReports.Viewer.Common/GrapeCity.Viewer.Common.Model.Interactivity.ApplyParametersAction.html">ApplyParametersAction</a></li></ul>
<p>To cancel the default action, set the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.canceleventargs.cancel">Cancel</a> property of the event arguments to <code>true</code>.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Viewer_Wpf_Viewer_Action_examples"><strong>Examples</strong></h5>
<pre><code class="lang-csharp">viewer.Action += (sender, e) =&gt;
{
    // Check if there's a specific action defined
    if (e.Action != null)
    {
        // Implement custom action handling logic here
        // This could involve checking the type of action and responding accordingly
        Debug.WriteLine($"Handling custom action: {action.GetType().Name}");
    }
};</code></pre>

</div>
