[]
Retrieves a collection of keyboard shortcuts configured for the viewer.
public IEnumerable<ViewerShortcut> GetShortcutCommands()
Type | Description |
---|---|
IEnumerable<ViewerShortcut> | A collection of ViewerShortcut objects, each representing a keyboard shortcut configured for various viewer actions. |
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.
// 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}");
}
Type | Condition |
---|---|
ArgumentNullException | Thrown if the internal storage for toolbar shortcuts is not initialized, indicating a configuration or initialization error within the viewer. |