I was trying to bind the grid to a data model where the hierarchy is 3 levels deep:
In the example code: I want to bind the grid to : ValueInnerInner, but this does not work.
public class ViewModel
{
public ViewModel()
DataSource = new ObservableCollection<SomeModel>();
DataSource.Add(new SomeModel());
}
public ObservableCollection<SomeModel> DataSource
get;
private set;
public class SomeModel
public SomeModelInner Inner
set;
public SomeModel()
Inner = new SomeModelInner();
public class SomeModelInner
public int Value
get
return 200;
public SomeModelInnerInner InnerInner
public SomeModelInner()
public class SomeModelInnerInner
public int ValueInnerInner
public SomeModelInnerInner()
here is the layout value for the above problem:
<
>
="XamGridLayout">
="Inner.Value"
/>
="Inner.InnerInner.ValueInnerInner"
Hello,
You can create such binding path and this is valid. Do you get any exceptions in the output window?
I am attaching the sample I created for this so you can look at it for reference.