Appendix K. Commanding Classes

This appendix summarizes predefined commanding classes. WPF provides these objects as static methods in the five classes described in the following sections. For more information about commanding, see Chapter 19.

ApplicationCommands

The ApplicationCommands class provides commands that apply at the application level. Table K-1 shows the commands and their keyboard gestures (or "N/A" for commands without gestures).

Table K.1. ApplicationCommand Commands

Command

Gesture

CancelPrint

N/A

Close

[Ctrl]+X or [Shift]+[Delete]

ContextMenu

[Shift]+[F10]

Copy

[Ctrl]+C, [Shift]+[Delete]

CorrectionList

N/A

Cut

[Ctrl]+X

Delete

[Delete]

Find

[Ctrl]+F

Help

[F1]

New

[Ctrl]+N

NotACommand

N/A

Open

[Ctrl]+O

Paste

[Ctrl]+V

Print

[Ctrl]+P

PrintPreview

[Ctrl]+[F2]

Properties

[F4]

Redo

[Ctrl]+Y

Replace

[Ctrl]+H

Save

[Ctrl]+S

SaveAs

[Ctrl]+H

SelectAll

[Ctrl]+A

Stop

[Escape]

Undo

[Ctrl]+Z

ComponentCommands

The ComponentCommands class defines commands that make sense for many kind of components. Many of these deal with changing focus or selection. Table K-2 shows the commands and their keyboard gestures.

Table K.2. ComponentCommands Commands

Command

Gesture

ExtendSelectionDown

[Shift]+Down

ExtendSelectionLeft

[Shift]+Left

ExtendSelectionRight

[Shift]+Right

ExtendSelectionUp

[Shift]+Up

MoveDown

Down

MoveFocusBack

[Ctrl]+Left

MoveFocusDown

[Ctrl]+Down

MoveFocusForward

[Ctrl]+Right

MoveFocusPageDown

[Ctrl]+[PageDown]

MoveFocusPageUp

[Ctrl]+[PageUp]

MoveFocusUp

[Ctrl]+Up

MoveLeft

Left

MoveRight

Right

MoveToEnd

[End]

MoveToHome

[Home]

MoveToPageDown

[PageDown]

MoveToPageUp ...

Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.