private int[] g1 = new int[9];
public int[] G1
{
get { return g1; }
set { NotifyPropertyChanged("G1[]"); }
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string propName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}
<TextBlock x:Name="R1G1" Text="{Binding G1[0]}" HorizontalAlignment="Left" Margin="0,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="80" Height="80"/>
G1 is filled with integers from 1 to 9 in a method.
Problem: Text of the textblock is set to 0 and they can not be updated.