I am trying to bind an indexed property with two indexers. The property looks like this
public Item this[int x, int y]
{
get { return _items[x, y]; }
set { _items[x, y] = value; }
}
According to http://msdn.microsoft.com/en-us/library/ms742451.aspx, it is possible to bind against indexed properties like that
<object Path="propertyName[index,index2...]" .../>
There is even an example:
<Rectangle Fill="{Binding ColorGrid[20,30].SolidColorBrushResult}" .../>
However when I try to access that property in XAML like that:
<Image Source="{Binding Items[0,0].Image}" />
I get an error in the designer:
The unnamed argument "0].Image" must appear before named arguments.
It seems to interpret 0].Image as the next argument. What am I missing?