FindName Method
Description
Finds an element that has the provided identifier name.
Syntax
Public Function FindName( _
ByVal Name As String _
) As MarkupObject
Parameters
- Name: The name of the requested element.
Return Type
The requested element. This can be a null reference (Nothing in Visual Basic) if no matching element was found.
Remarks
If the element has child elements, these child elements are all searched recursively for the requested named element.
This is useful when trying to search for a child element within some other element. For example, searching for a TextBlock inside a StackPanel. You would use FindName to find the TextBlock with the specified name, then you could modify the contents of the TextBlock that was returned.
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.