Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    IRendererManager Interface

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

    The interface for managing UI element renderers.

    public interface IRendererManager
    Name Description
    Methods
    GetRenderer(UIElement)

    Get the renderer of the corresponding UIElement.

    RegisterRenderer(UIElement, ElementRenderer)

    Associate a renderer to an UIElement.

    RegisterRendererFactory(Type, IElementRendererFactory)

    Associate a renderer factory to an UI element type.

    | Improve this Doc View Source

    Methods


    GetRenderer(UIElement)

    Get the renderer of the corresponding UIElement.

    ElementRenderer GetRenderer(UIElement element)
    Parameters
    Type Name Description
    UIElement element

    The element to render.

    Returns
    Type Description
    ElementRenderer

    The renderer to render the element.


    RegisterRenderer(UIElement, ElementRenderer)

    Associate a renderer to an UIElement.

    void RegisterRenderer(UIElement element, ElementRenderer renderer)
    Parameters
    Type Name Description
    UIElement element

    The element to which associate the renderer

    ElementRenderer renderer

    The renderer to associate to the UI element.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The element or the renderer is null.


    RegisterRendererFactory(Type, IElementRendererFactory)

    Associate a renderer factory to an UI element type.

    void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)
    Parameters
    Type Name Description
    System.Type uiElementType

    The type of ui elements to which associate the factory.

    IElementRendererFactory factory

    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
    Type Condition
    System.ArgumentNullException

    uiElementType or factory is null.

    System.InvalidOperationException

    uiElementType is not a descendant of UIElement.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation