Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SelectionTypes Enumeration

Defines identifiers that indicate the type of a selection.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace: System.ComponentModel.Design
Assembly: System (in system.dll)

[FlagsAttribute] 
[ComVisibleAttribute(true)] 
public enum SelectionTypes
/** @attribute FlagsAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public enum SelectionTypes
FlagsAttribute 
ComVisibleAttribute(true) 
public enum SelectionTypes
 Member nameDescription
AddRepresents an add selection that adds the selected components to the current selection, maintaining the current set of selected components. 
AutoRepresents a regular selection. The selection service responds to the CTRL and SHIFT keys to support adding or removing components to or from the selection. 
ClickRepresents a selection that occurs when a user clicks a component. If the newly selected component is already selected, it is promoted to be the primary selected component rather than being canceled. 
MouseDownRepresents a selection that occurs when the user presses on the mouse button while the mouse pointer is over a component. If the component under the pointer is already selected, it is promoted to become the primary selected component rather than being canceled. 
MouseUpRepresents a selection that occurs when the user releases the mouse button immediately after a component has been selected. If the newly selected component is already selected, it is promoted to be the primary selected component rather than being canceled. 
NormalRepresents a regular selection. The selection service responds to the CTRL and SHIFT keys to support adding or removing components to or from the selection. 
PrimaryRepresents a primary selection that occurs when a user clicks on a component. If a component in the selection list is already selected, the component is promoted to be the primary selection. 
RemoveRepresents a remove selection that removes the selected components from the current selection, maintaining the current set of selected components. 
ReplaceRepresents a selection that occurs when the content of a selection is replaced. The selection service replaces the current selection with the replacement. 
ToggleRepresents a toggle selection that switches between the current selection and the provided selection. If a component is already selected and is passed into SetSelectedComponents with a selection type of Toggle, the component selection will be canceled. 
ValidIdentifies the valid selection types as Normal, Replace, MouseDown, MouseUp, or Click

Components of a designer document can be selected using the SetSelectedComponents method of the ISelectionService. Some types of actions can operate on a selected component or group of selected components. The ISelectionService keeps track of the selection type of the current selection. These selection type identifiers indicate whether the selection was completed using a single click, a mouse down or mouse up selection, whether the selection should replace the previous selection, or use the default selection mode.

Use the SelectionTypes enumeration to specify the type of a selection when setting a new selection using the SetSelectedComponents method.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.