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.v24.1.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);
See Also