Class CompositeViewPreviewRenderer
Renders a UnityCompositeViewDefinition: wraps CompositePreviewBuilder for the live-render mode (no option hits — a composite has none of its own, mirroring the host's pre-registry behaviour) and delegates wireframe drawing to the shared SerenityUiWireframePainter.
Implements
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Editor.Preview.Renderers
Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
Syntax
public sealed class CompositeViewPreviewRenderer : IViewPreviewRenderer
Constructors
CompositeViewPreviewRenderer()
Declaration
public CompositeViewPreviewRenderer()
Properties
SupportsWireframe
Whether this renderer draws a structural wireframe, or the host shows a placeholder instead.
Declaration
public bool SupportsWireframe { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ViewKindLabel
The toolbar dropdown group label this renderer's definitions are listed under, e.g. "Menus".
Declaration
public string ViewKindLabel { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CanRender(UnityViewDefinition)
Whether this renderer knows how to draw definition.
Declaration
public bool CanRender(UnityViewDefinition definition)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityViewDefinition | definition | The definition in focus. |
Returns
| Type | Description |
|---|---|
| bool |
DrawWireframe(PreviewWireframeContext)
Draws one structural-wireframe frame. Never called when SupportsWireframe is false.
Declaration
public IReadOnlyList<WireframeOptionHit> DrawWireframe(PreviewWireframeContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| PreviewWireframeContext | context | The wireframe inputs. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<WireframeOptionHit> | The option rows drawn, for the host to hit-test/navigate clicks against. |
Render(PreviewRenderContext)
Builds one live-render frame under CanvasRoot.
Declaration
public PreviewRenderResult Render(PreviewRenderContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| PreviewRenderContext | context | The render inputs. |
Returns
| Type | Description |
|---|---|
| PreviewRenderResult | What the host overlays/hit-tests/paints for this frame. |