Skip to content

Interface IViewNodeFactory

Definition

Namespace: StardewUI.Framework.Binding
Assembly: StardewUI.dll

High-level abstraction for translating node trees into bound view trees.

public interface IViewNodeFactory

Members

Methods

Name Description
CreateNode(Document) Creates a bound view node, and all descendants, from the root of a parsed Document.
CreateNode(SNode, IReadOnlyList<INodeTransformer>, IResolutionScope) Creates a bound view node, and all descendants, from parsed node data.

Details

Methods

CreateNode(Document)

Creates a bound view node, and all descendants, from the root of a parsed Document.

StardewUI.Framework.Binding.IViewNode CreateNode(StardewUI.Framework.Dom.Document document);
Parameters

document   Document
The markup document.

Returns

IViewNode

An IViewNode providing the IView bound with the node's attributes and children, which automatically applies changes on each Update(TimeSpan).

Remarks

This method automatically infers the correct IResolutionScope, so it does not require an explicit scope to be given.


CreateNode(SNode, IReadOnlyList<INodeTransformer>, IResolutionScope)

Creates a bound view node, and all descendants, from parsed node data.

StardewUI.Framework.Binding.IViewNode CreateNode(StardewUI.Framework.Dom.SNode node, System.Collections.Generic.IReadOnlyList<StardewUI.Framework.Dom.INodeTransformer> nodeTransformers, StardewUI.Framework.Content.IResolutionScope resolutionScope);
Parameters

node   SNode
The node data.

nodeTransformers   IReadOnlyList<INodeTransformer>
Transformers to run on each document node before using it to create a runtime (bound) view node.

resolutionScope   IResolutionScope
Scope for resolving externalized attributes, such as translation keys.

Returns

IViewNode

An IViewNode providing the IView bound with the node's attributes and children, which automatically applies changes on each Update(TimeSpan).