Many projects have been getting to the complexity where it is a nuisance to work around "single-level" bindings involving one context and one property; as the models become complicated, there is more of a need to write repetitive pass-through properties just to make them play nice with Stardew UI.
While there are going to have to be some quirks and limitations, the framework should start to support more complex property expressions, starting with the basic form of "dot properties", e.g.
public class Foo
{
public Bar Bar { get; set; }
}
public class Bar
{
public Baz Baz { get; set; }
}
public class Baz
{
public string Name { get; set; }
}
(when bound to an instance of Foo)
<label text={Bar.Baz.Name} />
The current workaround is essentially *context but this (a) requires additional pass-through views which serve no other purpose and (b) make the view code considerably messier.
Many projects have been getting to the complexity where it is a nuisance to work around "single-level" bindings involving one context and one property; as the models become complicated, there is more of a need to write repetitive pass-through properties just to make them play nice with Stardew UI.
While there are going to have to be some quirks and limitations, the framework should start to support more complex property expressions, starting with the basic form of "dot properties", e.g.
(when bound to an instance of
Foo)The current workaround is essentially
*contextbut this (a) requires additional pass-through views which serve no other purpose and (b) make the view code considerably messier.