Method FindElement
FindElement(string)
Recursively searches all LogicalChildrenCollection for a control with the specified name, and throws an exception if the requested control is not found.
public UIElement FindElement(string name)
Parameters
name
stringThe name of the control to be found.
Returns
- UIElement
The requested resource. If no control with the provided name was found, an exception is thrown.
Exceptions
- InvalidOperationException
A control with the provided name was found.