Selection Class

Definition

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

public ref class Selection : System::Activities::Presentation::ContextItem
public class Selection : System.Activities.Presentation.ContextItem
type Selection = class
    inherit ContextItem
Public Class Selection
Inherits ContextItem
Inheritance
Selection

Remarks

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.

Constructors

Selection()

Creates an empty Selection object.

Selection(IEnumerable)

Creates a Selection object with the specified objects selected.

Selection(IEnumerable, Predicate<ModelItem>)

Creates a Selection object with the specified objects selected.

Selection(IEnumerable<ModelItem>)

Creates a Selection object with the specified objects selected.

Selection(IEnumerable<ModelItem>, Predicate<ModelItem>)

Creates a Selection object with the specified objects selected.

Selection(ModelItem[])

Creates a Selection object with the specified objects selected.

Properties

ItemType

Returns the item type for this editing context item.

PrimarySelection

Returns the primary selection.

SelectedObjects

The enumeration of selected objects.

SelectionCount

The number of objects that are currently selected in this selection.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnItemChanged(EditingContext, ContextItem)

Represents 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)
Select(EditingContext, ModelItem)

A 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.

SelectOnly(EditingContext, ModelItem)

A selection helper method that sets an item into the selection. Any existing items are deselected.

Subscribe(EditingContext, SubscribeContextCallback<Selection>)

A helper method that subscribes to selection change events.

Toggle(EditingContext, ModelItem)

A selection helper method that 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()

Returns a string that represents the current object.

(Inherited from Object)
Union(EditingContext, ModelItem)

A 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.

Unsubscribe(EditingContext, SubscribeContextCallback<Selection>)

A helper method that removes a previously added selection change event.

Applies to