Paulo Dias
Paulo Dias

Reputation: 113

MvvmCross: Bindings for Android

I'm developing an application for android and WF8 using mvvmcross.

In WF8 UI I use this code:

 IsReadOnly="{Binding Path=DataContext.IsReadOnly, ElementName=DetailPageContentPanel }

and get access to "IsReadOnly" property set at a level above,
Can I do the same in android? My objective is to get a property access inside a template for a Mvx.MvxBindableLinearLayout.

Thank you in advance for help.

Upvotes: 2

Views: 459

Answers (1)

Stuart
Stuart

Reputation: 66882

Currently. No.

There is no binding access to anything except your own DataContext.

There was an idea for access to $parent for v3, but it didn't make the alpha cutoff deadline.

For now, the best way is to provide all the properties you need via the target binding object - eg to use Linq to provide access to a List<ObjectWithParent<T>> instead of List<T>

If you think this functionality is important, please log it as a feature request issue on github/slodge/mvvmcross, providing as much detail about your use case as possible.

Upvotes: 1

Related Questions