Table of Contents

Class View.Extra<T>

Namespace
Xui.Core.UI
Assembly
Xui.Core.dll

A typed key for attaching extra layout or styling data to any View. Declare one static instance per logical property (e.g. Grid.Row, FlexBox.Grow) and use it with the view indexer: view[Grid.Row] = 2.

public sealed class View.Extra<T> : View.Extra

Type Parameters

T

The type of the value stored under this key.

Inheritance
View.Extra<T>
Inherited Members

Constructors

Extra(T)

public Extra(T defaultValue = default)

Parameters

defaultValue T

Returned by the indexer getter until a value is explicitly set.

Properties

DefaultValue

The value returned when no data has been stored for this key on a given view.

public T DefaultValue { get; }

Property Value

T

Methods

Get(View)

Returns the value stored for this key on view, or DefaultValue if nothing has been set.

public T Get(View view)

Parameters

view View

Returns

T