Method ProvideContext
ProvideContext<T>(VisualElement, T)
Make the element provide a context of a given type in a VisualElement.
Declaration
public static void ProvideContext<T>(this VisualElement element, T context) where T : IContext
Parameters
| Type | Name | Description |
|---|---|---|
| VisualElement | element | The VisualElement object. |
| T | context | The context. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the context. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The VisualElement object can't be null. |