Skip to content

Interface IViewDescriptor

Definition

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

Describes a type of view that can be used in a view binding.

public interface IViewDescriptor : 
    StardewUI.Framework.Descriptors.IObjectDescriptor

Implements
IObjectDescriptor

Remarks

The binding target is independent of the actual IView instance; it provides methods and data to support interacting with any view of the given TargetType.

Members

Methods

Name Description
GetChildrenProperty(string) Retrieves the property of the TargetType that holds the view's children/content.
TryGetChildrenProperty(string, IPropertyDescriptor) Attempts to retrieve the property of the TargetType that holds the view's children/content.

Details

Methods

GetChildrenProperty(string)

Retrieves the property of the TargetType that holds the view's children/content.

StardewUI.Framework.Descriptors.IPropertyDescriptor GetChildrenProperty(string outletName);
Parameters

outletName   string
The name of the specific outlet, if targeting a non-default outlet on a view with multiple outlets. Corresponds to Name.

Returns

IPropertyDescriptor

The view children property.


TryGetChildrenProperty(string, IPropertyDescriptor)

Attempts to retrieve the property of the TargetType that holds the view's children/content.

bool TryGetChildrenProperty(string outletName, out StardewUI.Framework.Descriptors.IPropertyDescriptor property);
Parameters

outletName   string
The name of the specific outlet, if targeting a non-default outlet on a view with multiple outlets. Corresponds to Name.

property   IPropertyDescriptor
When this method returns, holds a reference to the IPropertyDescriptor that holds the view's children/content, or null if no such property is available.

Returns

Boolean

true if a children/content property was found, otherwise false.