ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Wpf Assembly / GrapeCity.ActiveReports.Viewer.Wpf Namespace / Viewer Class / Action Event
Example

In This Topic
    Action Event (Viewer)
    In This Topic
    Occurs when an action is performed on the document in the viewer.
    Syntax
    'Declaration
     
    Public Event Action As EventHandler(Of Viewer.ActionEventArgs)
    Event Data

    The event handler receives an argument of type Viewer.ActionEventArgs containing data related to this event. The following Viewer.ActionEventArgs properties provide information specific to this event.

    PropertyDescription
    Gets the Action that caused the event.  
    Gets the page number the action happened on.  
    Remarks
    Example
    viewer.Action += (sender, e) =>
    {
        // 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}");
        }
    };
    See Also