[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Viewer.Win.Viewer.GetShortcutCommands

GetShortcutCommands Method

GetShortcutCommands()

Retrieves a collection of keyboard shortcuts configured for the viewer.

Declaration
public IEnumerable<ViewerShortcut> GetShortcutCommands()
Returns
Type Description
IEnumerable<ViewerShortcut>

A collection of ViewerShortcut objects, each representing a keyboard shortcut configured for various viewer actions.

Remarks

This method provides access to the viewer's keyboard shortcuts, allowing external components or applications to display, customize, or respond to these shortcuts. It is essential for enhancing user accessibility and efficiency when interacting with the viewer.

Examples
// Assuming 'viewer' is an instance of Viewer.
// Retrieving the list of shortcut commands available in the viewer.
var shortcutCommands = viewer.GetShortcutCommands();
foreach (var command in shortcutCommands)
{
    Console.WriteLine($"Command: {command.Command}, Enabled: {command.Enabled}");
}
Exceptions
Type Condition
ArgumentNullException

Thrown if the internal storage for toolbar shortcuts is not initialized, indicating a configuration or initialization error within the viewer.