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 FrameworkElement FindElement(string name)
Parameters
namestringThe name of the control to be found.
Returns
- FrameworkElement
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.