Table of Contents

Class RendererManager

Namespace
Stride.UI.Renderers
Assembly
Stride.UI.dll

The class in charge to manage the renderer of the different UIElements. Once registered into the manager, a renderer is owned by the manager.

public class RendererManager : IRendererManager, IDisposable
Inheritance
RendererManager
Implements
Extension Methods

Constructors

RendererManager(IElementRendererFactory)

Create a new instance of RendererManager with provided DefaultFactory

public RendererManager(IElementRendererFactory defaultFactory)

Parameters

defaultFactory IElementRendererFactory

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetRenderer(UIElement)

Get the renderer of the corresponding UIElement.

public ElementRenderer GetRenderer(UIElement element)

Parameters

element UIElement

The element to render.

Returns

ElementRenderer

The renderer to render the element.

RegisterRenderer(UIElement, ElementRenderer)

Associate a renderer to an UIElement.

public void RegisterRenderer(UIElement element, ElementRenderer renderer)

Parameters

element UIElement

The element to which associate the renderer

renderer ElementRenderer

The renderer to associate to the UI element.

Exceptions

ArgumentNullException

The element or the renderer is null.

RegisterRendererFactory(Type, IElementRendererFactory)

Associate a renderer factory to an UI element type.

public void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)

Parameters

uiElementType Type

The type of ui elements to which associate the factory.

factory IElementRendererFactory

The 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 or factory is null.

InvalidOperationException

uiElementType is not a descendant of UIElement.