Share via


ModelService.FromName Method (ModelItem, String)

Finds the model item in the specified scope with the specified name.

Namespace:  Microsoft.Windows.Design.Services
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Function FromName ( _
    scope As ModelItem, _
    name As String _
) As ModelItem
public ModelItem FromName(
    ModelItem scope,
    string name
)
public:
ModelItem^ FromName(
    ModelItem^ scope, 
    String^ name
)
member FromName : 
        scope:ModelItem * 
        name:string -> ModelItem 
public function FromName(
    scope : ModelItem, 
    name : String
) : ModelItem

Parameters

Return Value

Type: Microsoft.Windows.Design.Model.ModelItem
A model item whose name matches name, or nulla null reference (Nothing in Visual Basic) if no match was found.

Remarks

If scope is not provided, the root element is used as the scope. If scope is provided, the nearest INameScope interface in the hierarchy is used to locate the item.

.NET Framework Security

See Also

Reference

ModelService Class

FromName Overload

Microsoft.Windows.Design.Services Namespace

ModelItem

ViewService

DesignerView

ContextItemManager

Other Resources

Editing Model Architecture

WPF Designer Extensibility