Skip to main content

ReportDesigner.RegisterHotKey(Key, ModifierKeys, Func<ICommand>, Object) Method

Registers the specified hot key in the Report Designer.

Namespace: DevExpress.Xpf.Reports.UserDesigner

Assembly: DevExpress.Xpf.ReportDesigner.v25.2.dll

NuGet Package: DevExpress.Wpf.Reporting

Declaration

public void RegisterHotKey(
    Key key,
    ModifierKeys modifiers,
    Func<ICommand> getCommand,
    object parameter
)

Parameters

Name Type Description
key Key

A Key enumeration value that specifies the hot key to be registered.

modifiers ModifierKeys

A ModifierKeys enumeration value that specifies modifier keys that should be pressed in combination with the key.

getCommand Func<ICommand>

A function that returns a command to be executed when the hot key is pressed.

parameter Object

An object that specifies a command parameter.

Remarks

The following code snippet demonstrates how to register the hot key to invoke the Save As dialog.

using System.Windows.Input;
// ...

reportDesigner.RegisterHotKey(Key.S, ModifierKeys.Control, 
    () => reportDesigner.ActualCommands.SaveDocumentAsCommand, null);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterHotKey(Key, ModifierKeys, Func<ICommand>, Object) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also