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
- scope
Type: Microsoft.Windows.Design.Model.ModelItem
An optional scope to search.
- name
Type: System.String
The name of the item to locate.
- comparison
Type: System.StringComparison
Specifies how the name is compared. The default is to compare with the Ordinal property.
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