Как изменить текст кнопки в Windows Phone 7 и C #? Исключение NullPointer тоже, если я делаю изменение текста кнопки правильно, в чем проблема?
public void CreateWords(Word[] theWords)
{
listOfWords = new Button[theWords.Length]; //Button Array
textBlock1.Text = theWords[0].getWord(); //Totally Works
for (int i = 0; i < theWords.Length; i++)
{
listOfWords[i].Content = theWords[0].getWord(); //NullPointer Exception
}
for (int i = 0; i < theWords.Length; i++)
{
stackWords.Children.Add(listOfWords[i]);
}
}