ModelService.Find Method (ModelItem, 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, _
type As Type _
) As IEnumerable(Of ModelItem)
public abstract IEnumerable<ModelItem> Find(
ModelItem startingItem,
Type type
)
public:
virtual IEnumerable<ModelItem^>^ Find(
ModelItem^ startingItem,
Type^ type
) abstract
abstract Find :
startingItem:ModelItem *
type:Type -> IEnumerable<ModelItem>
public abstract function Find(
startingItem : ModelItem,
type : Type
) : IEnumerable<ModelItem>
Parameters
- startingItem
Type: Microsoft.Windows.Design.Model.ModelItem
The model item to start the search. Items above this item will be 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.
- type
Type: System.Type
The type of the object to find.
Return Value
Type: System.Collections.Generic.IEnumerable<ModelItem>
An enumeration of model items matching the query.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | type is nulla null reference (Nothing in Visual Basic). |
Remarks
The Find method enumerates all items in the specified parent scope that are of the requested type.
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