Back to Devexpress

ActionBase.Shortcut Property

expressappframework-devexpress-dot-expressapp-dot-actions-dot-actionbase-36909c29.md

latest5.5 KB
Original Source

ActionBase.Shortcut Property

Defines the keyboard shortcut that executes the current Action.

Namespace : DevExpress.ExpressApp.Actions

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[DefaultValue(null)]
public string Shortcut { get; set; }
vb
<DefaultValue(Nothing)>
Public Property Shortcut As String

Property Value

TypeDefaultDescription
Stringnull

A string that specifies the current Action’s shortcut in an XAF ASP.NET Core Blazor or Windows Forms application.

|

Remarks

Use this property to assign shortcuts for Actions in code.

The Application Model uses the ActionBase.Shortcut value as the default value for the IModelAction.Shortcut property. You can override it in the ActionDesign | Actions | <Action> node of the Model Editor.

Windows Forms

You can use the following values with the Shortcut property:

The following table contains default shortcuts you can use to execute Actions in XAF Windows Forms applications:

ActionShortcut
NavigateBackAlt+LeftArrow
NavigateForwardAlt+RightArrow
NewCtrl+N
SaveCtrl+S
DeleteCtrl+D
SaveAndCloseControl+Enter
RefreshF5
EditModelCtrl+Shift+F1
Print (from the Printing Module)Ctrl+P
Open (from the FileAttachments module)Ctrl+O
SaveTo (from the FileAttachments module)Ctrl+Shift+S

Note

XAF Windows Forms applications do not support multiple shortcuts for a single Action.

ASP.NET Core Blazor

In XAF ASP.NET Core Blazor applications, shortcuts are available for Actions that appear as Toolbar items and Grid Row Context Menu items.

XAF does not distinguish between the left or right modifier keys: Control, Shift, or Alt.

XAF ASP.NET Core Blazor applications support multiple shortcuts for a single Action. The semicolon symbol separates individual shortcuts and cannot be part of a shortcut.

XAF ASP.NET Core Blazor applications support most of the Windows Forms syntax, but we recommend setting shortcuts in ASP.NET Core Blazor applications as follows:

  • Control+Shift+Alt+Windows+O
  • Control+Shift+O
  • Control+Shift+PageDown
  • Control+Shift+ArrowLeft
  • Control+Shift+Equal
  • Control+Shift+Period
  • Shift+O
  • Command+O
  • Control+O;Command+O

For specific code values (for example, Period, Comma, or Slash), refer to the following list: Keyboard Event Code Values (MDN)

The following table contains default shortcuts you can use to execute Actions in XAF ASP.NET Core Blazor applications:

ActionShortcut
DeleteActionControl+Delete
SaveActionControl+Shift+S
SaveAndCloseActionControl+Shift+Enter
NewObjectActionControl+Shift+A
PreviousObjectActionControl+Alt+ArrowLeft
NextObjectActionControl+Alt+ArrowRight
RefreshActionControl+Shift+R
AcceptActionControl+Shift+Enter
LogonActionEnter

See Also

ActionBase Class

ActionBase Members

DevExpress.ExpressApp.Actions Namespace