Share via


SelectionCommands Class

Provides standard commands that control the selection of objects in a designer.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Interaction.SelectionCommands

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

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

The SelectionCommands type exposes the following members.

Properties

  Name Description
Public propertyStatic member Clear Gets a RoutedCommand that represents a request to clear the existing selection.
Public propertyStatic member SelectAll Gets a RoutedCommand that represents a request to select all objects in the designer.
Public propertyStatic member SelectNext Gets a RoutedCommand that represents a request to select the next object in the designer.
Public propertyStatic member SelectOnlyTarget Gets a ToolCommand that represents a request to select only the object under the mouse pointer in the designer.
Public propertyStatic member SelectPrevious Gets a RoutedCommand that represents a request to select the previous object in the designer.
Public propertyStatic member SelectTarget Gets a ToolCommand that represents a request to select the object under the mouse pointer in the designer.
Public propertyStatic member ShowEvent Gets a ToolCommand that represents a request to display the default event handler for the primary selection object in the designer.
Public propertyStatic member ToggleSelectTarget Gets a ToolCommand that represents a request to toggle the selection state of the object under the mouse pointer in the designer.
Public propertyStatic member UnionSelectTarget Gets a ToolCommand that represents a request to add the object under the mouse pointer in the designer to the existing selection.

Top

Remarks

The concept of selection is different for different types of designers. When a user selects objects in a designer, there are some standard behaviors the designer should exhibit. For example, the user should be able to select an object, select multiple objects, deselect objects, and select all objects. You can use extensibility to control how the user selects objects in the designer.

Note

Other types of selection that are not covered here include text selection, where a range of text on an object is selected, and point selection, where one or more points on a curve are selected. Complex selection patterns, such as dragging a rectangle to select several objects, are handled by the TaskProvider providers of those objects.

When multiple objects are selected in a designer, one object is the primary selection object. The primary selection object is often used as a key for other behaviors. For example, to align all selected objects to the left, the primary selection object determines where to align the objects.

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.Design.Interaction Namespace

Selection

SelectionOperations

SelectionTool

EditingContext

ToolCommand

Other Resources

WPF Designer Extensibility Architecture