Selection(T, Owner) Class
The Selection class defines a selection of T. Selections consist of zero or more items. The first item in a selection is defined as the "primary" selection, which is used when one object in a group must be used as a key.
Inheritance Hierarchy
System..::..Object
Microsoft.Data.Tools.Design.Core.Context..::..ContextItem
Microsoft.Data.Tools.Design.Core.Context..::..Selection<(Of <(<'T, Owner>)>)>
Namespace: Microsoft.Data.Tools.Design.Core.Context
Assembly: Microsoft.Data.Tools.Design.Core (in Microsoft.Data.Tools.Design.Core.dll)
Syntax
'Declaration
Public NotInheritable Class Selection(Of T, Owner) _
Inherits ContextItem _
Implements IDisposable
'Usage
Dim instance As Selection(Of T, Owner)
public sealed class Selection<T, Owner> : ContextItem,
IDisposable
generic<typename T, typename Owner>
public ref class Selection sealed : public ContextItem,
IDisposable
[<SealedAttribute>]
type Selection<'T, 'Owner> =
class
inherit ContextItem
interface IDisposable
end
JScript does not support generic types and methods.
Type Parameters
- T
- Owner
The Selection<(Of <(<'T, Owner>)>)> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Selection< (Of < ( <'T, Owner> ) > ) >() () () () | Creates an empty Selection object. | |
Selection< (Of < ( <'T, Owner> ) > ) >(IEnumerable< (Of < <' (T> ) > > ), T) | Creates a collection object comprising the given selected objects. The first object in the enumeration is considered the "primary" selection. |
Top
Properties
Name | Description | |
---|---|---|
Container | Gets or sets {insert text here}. | |
ItemType | Override of ContextItem's ItemType property. The ItemType of Selection is always "typeof(Selection)". (Overrides ContextItem..::..ItemType.) | |
PrimarySelection | The primary selection. Some functions require a "key" element. For example, an "align lefts" command needs to know which element's "left" to align to. | |
SelectedObjects | The enumeration of selected objects. | |
SelectionCount | The number of objects that are currently selected into this selection. |
Top
Methods
Name | Description | |
---|---|---|
AddRemove | ||
Clear | Clears the selection contained in the editing context. | |
Dispose | ||
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetPrimarySelection | ||
GetSelectedObjects | ||
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
OnItemChanged | This method is called on a context item before it is stored in the context item manager. The previous item in the context item manager is passed. (Inherited from ContextItem.) | |
RegisterSelectionFilter | ||
Replace | Selection helper method. This replaces the current selection with a new active set containing only the given items. | |
SelectOnly | Selection helper method. This sets itemToSelect into the selection. Any existing items are deselected. | |
SetContainer | Set the container object for the selection | |
SetPrimarySelection | Set the primary selection to be the specified item | |
Subscribe | Helper method that subscribes to selection change events. | |
Toggle | Selection helper method. This takes the existing selection in the context and creates a new selection that contains the toggled state of the item. If the item is to be added to the selection, it is added as the primary selection. | |
ToString | (Inherited from Object.) | |
Unsubscribe | Helper method that removes a previously added selection change event. |
Top
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.