Bagikan melalui


ModelService.FromName Method (ModelItem, String, StringComparison)

When overridden in a derived class, finds the model item in the specified scope with the specified name and comparison criteria.

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

Syntax

'Declaration
Public MustOverride Function FromName ( _
    scope As ModelItem, _
    name As String, _
    comparison As StringComparison _
) As ModelItem
public abstract ModelItem FromName(
    ModelItem scope,
    string name,
    StringComparison comparison
)
public:
virtual ModelItem^ FromName(
    ModelItem^ scope, 
    String^ name, 
    StringComparison comparison
) abstract
abstract FromName : 
        scope:ModelItem * 
        name:string * 
        comparison:StringComparison -> ModelItem 
public abstract function FromName(
    scope : ModelItem, 
    name : String, 
    comparison : StringComparison
) : 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