Share via


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.

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

See Also

Reference

ModelService Class

Find Overload

Microsoft.Windows.Design.Services Namespace

ModelItem

Other Resources

Editing Model Architecture

WPF Designer Extensibility