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
- scope
Type: Microsoft.Windows.Design.Model.ModelItem
An optional scope to search.
- name
Type: System.String
The name of the item to locate.
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
- 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