SystemCommands Class

Defines routed commands that are common to window management.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Shell.SystemCommands

Namespace:  Microsoft.Windows.Shell
Assembly:  Microsoft.Windows.Shell (in Microsoft.Windows.Shell.dll)

Syntax

'Declaration
Public NotInheritable Class SystemCommands
public static class SystemCommands
public ref class SystemCommands abstract sealed
[<AbstractClass>]
[<Sealed>]
type SystemCommands =  class end
public final class SystemCommands

The SystemCommands type exposes the following members.

Properties

  Name Description
Public propertyStatic member CloseWindowCommand Gets a command that closes a window.
Public propertyStatic member MaximizeWindowCommand Gets a command that maximizes a window.
Public propertyStatic member MinimizeWindowCommand Gets a command that maximizes a window.
Public propertyStatic member RestoreWindowCommand Gets a command that restores a window.
Public propertyStatic member ShowSystemMenuCommand Gets a command that displays the system menu.

Top

Methods

  Name Description
Public methodStatic member CloseWindow Closes the specified window.
Public methodStatic member MaximizeWindow Maximizes the specified window.
Public methodStatic member MinimizeWindow Minimizes the specified window.
Public methodStatic member RestoreWindow Restores the specified widow.
Public methodStatic member ShowSystemMenu Displays the system menu for the specified window.

Top

Remarks

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Windows.Shell Namespace

InputBinding

Other Resources

Commanding Overview

How to: Hook Up a Command to a Control with Command Support