SystemCommands Class

.NET Framework 4.5

Defines routed commands that are common to window management.

System.Object
  System.Windows.SystemCommands

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static class SystemCommands

The SystemCommands type exposes the following members.

  NameDescription
Public propertyStatic memberCloseWindowCommandGets a command that closes a window.
Public propertyStatic memberMaximizeWindowCommandGets a command that maximizes a window.
Public propertyStatic memberMinimizeWindowCommandGets a command that maximizes a window.
Public propertyStatic memberRestoreWindowCommandGets a command that restores a window.
Public propertyStatic memberShowSystemMenuCommandGets a command that displays the system menu.
Top

  NameDescription
Public methodStatic memberCloseWindowCloses the specified window.
Public methodStatic memberMaximizeWindowMaximizes the specified window.
Public methodStatic memberMinimizeWindowMinimizes the specified window.
Public methodStatic memberRestoreWindowRestores the specified widow.
Public methodStatic memberShowSystemMenuDisplays the system menu for the specified window.
Top

The commands in the SystemCommands class represent a set of common commands that manage a Window. The properties in this class represent RoutedCommand objects and do not provide the implementation logic for the command. You can provide the logic for a command by binding the command with a CommandBinding. For more information, see How to: Hook Up a Command to a Control with No Command Support. Alternatively, the SystemCommands class provides static methods that implement the logic for the specified Window. You can pass a static method to a type that implements ICommand and that accepts a delegate. For more information, see the example in the InputBinding class.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft