Interface IRendererManager
The interface for managing UI element renderers.
public interface IRendererManager
Methods
GetRenderer(UIElement)
Get the renderer of the corresponding UIElement.
ElementRenderer GetRenderer(UIElement element)
Parameters
element
UIElementThe element to render.
Returns
- ElementRenderer
The renderer to render the element.
RegisterRenderer(UIElement, ElementRenderer)
Associate a renderer to an UIElement.
void RegisterRenderer(UIElement element, ElementRenderer renderer)
Parameters
element
UIElementThe element to which associate the renderer
renderer
ElementRendererThe renderer to associate to the UI element.
Exceptions
- ArgumentNullException
The
element
or therenderer
is null.
RegisterRendererFactory(Type, IElementRendererFactory)
Associate a renderer factory to an UI element type.
void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)
Parameters
uiElementType
TypeThe type of ui elements to which associate the factory.
factory
IElementRendererFactoryThe renderer factory to associate to the UI element type
uiElementType
Remarks
A factory associated to the type "MyType" is also be used to create renderer from descendant of "MyType" excepted if a factory is directly associated to the descendant type.
Exceptions
- ArgumentNullException
uiElementType
orfactory
is null.- InvalidOperationException
uiElementType
is not a descendant of UIElement.