I have trouble to formulate the XAML string to link to a specific element in a multidimensional array.
The DataContext contains the following lines:
You can bind to a Two dimensional array using a MultivalueConverter defined like this :
class MultiDimensionalCoverter:IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
return (values[0] as String[,])[(int) values[1], (int) values[2]];
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
that MultiDimensionalCoverter get 3 parameters, the Two Dimention array plus the two indexes, and the Xaml will be like this :
defining the indexes as properties in your VM is probably more appropriate, i am using fixed value only to demonstrate.