Selection Constructor (IEnumerable<ModelItem>, Predicate<ModelItem>)
Initializes a new instance of the Selection class by using the specified enumeration of ModelItem objects and predicate.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Sub New ( _
selectedObjects As IEnumerable(Of ModelItem), _
match As Predicate(Of ModelItem) _
)
public Selection(
IEnumerable<ModelItem> selectedObjects,
Predicate<ModelItem> match
)
public:
Selection(
IEnumerable<ModelItem^>^ selectedObjects,
Predicate<ModelItem^>^ match
)
new :
selectedObjects:IEnumerable<ModelItem> *
match:Predicate<ModelItem> -> Selection
public function Selection(
selectedObjects : IEnumerable<ModelItem>,
match : Predicate<ModelItem>
)
Parameters
- selectedObjects
Type: System.Collections.Generic.IEnumerable<ModelItem>
An enumeration of ModelItem objects to add to the selection.
- match
Type: System.Predicate<ModelItem>
Only those objects in selectedObjects that match the predicate are added to the selection.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The selectedObjects or match parameter is nulla null reference (Nothing in Visual Basic). |
Remarks
This constructor creates a selection that contains the specified objects. The first object in selectedObjects that matches the predicate is the primary selection object.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace