Export (0) Print
Expand All

Selection Class

Defines a selection of objects that are published as a ContextItem in the EditingContext.

System.Object
  System.Activities.Presentation.ContextItem
    System.Activities.Presentation.View.Selection

Namespace:  System.Activities.Presentation.View
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public class Selection : ContextItem

The Selection type exposes the following members.

  NameDescription
Public methodSelection()Creates an empty Selection object.
Public methodSelection(IEnumerable)Creates a Selection object with the specified objects selected.
Public methodSelection(ModelItem[])Creates a Selection object with the specified objects selected.
Public methodSelection(IEnumerable<ModelItem>)Creates a Selection object with the specified objects selected.
Public methodSelection(IEnumerable, Predicate<ModelItem>)Creates a Selection object with the specified objects selected.
Public methodSelection(IEnumerable<ModelItem>, Predicate<ModelItem>)Creates a Selection object with the specified objects selected.
Top

  NameDescription
Public propertyItemTypeReturns the item type for this editing context item. (Overrides ContextItem.ItemType.)
Public propertyPrimarySelectionReturns the primary selection.
Public propertySelectedObjectsThe enumeration of selected objects.
Public propertySelectionCountThe number of objects that are currently selected in this selection.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnItemChangedRepresents a method that is called on the context item before it is stored in the context item manager. The previous item in the context item manager is passed as a parameter. (Inherited from ContextItem.)
Public methodStatic memberSelectA selection helper method that takes the existing selection in the context and selects an item into it. If the item is already in the selection, the selection is preserved and the item is promoted to the primary selection.
Public methodStatic memberSelectOnlyA selection helper method that sets an item into the selection. Any existing items are deselected.
Public methodStatic memberSubscribeA helper method that subscribes to selection change events.
Public methodStatic memberToggleA selection helper method that takes the existing selection in thecontext 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.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodStatic memberUnionA selection helper method that takes the existing selection in the context and creates a new selection that contains the original selection and the specified item to add. If the specified item to add is already in the original selection, it is promoted to the primary selection.
Public methodStatic memberUnsubscribeA helper method that removes a previously added selection change event.
Top

Selections consist of zero or more objects. The first object in a selection is defined as the primary selection, which is used when one object in a group must be used as a key. Each object is stored as a ModelItem.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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.

Community Additions

ADD
Show:
© 2014 Microsoft