Skip to content

Interface IViewDefaults

Definition

Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll

Provides access to the default values of a view's properties.

public interface IViewDefaults

Remarks

These defaults are not part of the IViewDescriptor or IPropertyDescriptor<T> interfaces because they cannot be reliably detected through reflection alone; instead they require support from a source generator, if known at compile time, or a dummy/"blank" instance of the view created at runtime otherwise.

Members

Methods

Name Description
GetDefaultValue<T>(string) Gets the default value for the named property.

Details

Methods

GetDefaultValue<T>(string)

Gets the default value for the named property.

T GetDefaultValue<T>(string propertyName);
Parameters

propertyName   string
The property name.

Returns

T

The default value of the specified property for a newly-created view.