ModelService.Find Method (ModelItem, Predicate<Type>)
When overridden in a derived class, finds matching model items for a specified starting point.
Namespace: Microsoft.Windows.Design.Services
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public MustOverride Function Find ( _
startingItem As ModelItem, _
match As Predicate(Of Type) _
) As IEnumerable(Of ModelItem)
public abstract IEnumerable<ModelItem> Find(
ModelItem startingItem,
Predicate<Type> match
)
public:
virtual IEnumerable<ModelItem^>^ Find(
ModelItem^ startingItem,
Predicate<Type^>^ match
) abstract
abstract Find :
startingItem:ModelItem *
match:Predicate<Type> -> IEnumerable<ModelItem>
public abstract function Find(
startingItem : ModelItem,
match : Predicate<Type>
) : IEnumerable<ModelItem>
Parameters
- startingItem
Type: Microsoft.Windows.Design.Model.ModelItem
The model item to start the search. Items above this item are ignored. This item, and any item below it in the hierarchy, are included in the search. If this parameter is nulla null reference (Nothing in Visual Basic), the root is used.
- match
Type: System.Predicate<Type>
A predicate that allows more complex type matching to be used. For example, the predicate could return true for both the FrameworkElement and FrameworkContentElement types.
Return Value
Type: System.Collections.Generic.IEnumerable<ModelItem>
An enumeration of model items matching the query.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | match is nulla null reference (Nothing in Visual Basic). |
Remarks
All traversals of the editing model are recursive.
.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.Services Namespace