Skip to content

Interface IViewFactory

Definition

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

Factory for creating views from tags.

public interface IViewFactory

Remarks

This is a simple, low-level abstraction that simply maps tags to view types. It does not perform any reflection or participate in view binding.

Members

Methods

Name Description
CreateView(string) Creates a new view.
SupportsTag(string) Checks if the factory can create views corresponding to a specific tag.

Details

Methods

CreateView(string)

Creates a new view.

StardewUI.IView CreateView(string tagName);
Parameters

tagName   string
The markup tag that specifies the type of view.

Returns

IView

A new view of a type corresponding to the tagName.


SupportsTag(string)

Checks if the factory can create views corresponding to a specific tag.

bool SupportsTag(string tagName);
Parameters

tagName   string
The markup tag that specifies the type of view.

Returns

Boolean

true if this factory should handle the specified tagName, otherwise false.