Method GetContextProvider
GetContextProvider<T>(VisualElement)
Find the closest context provider in the hierarchy of a VisualElement.
Declaration
public static VisualElement GetContextProvider<T>(this VisualElement element) where T : IContext
Parameters
Type | Name | Description |
---|---|---|
VisualElement | element | The VisualElement object. |
Returns
Type | Description |
---|---|
VisualElement | The context provider. |
Type Parameters
Name | Description |
---|---|
T | The type of the context. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The VisualElement object can't be null. |