0
如何更改Windows Phone 7和C#中按钮的文本? NullPointer异常也是,如果我正在更改按钮文本的权利,那么问题是什么?更改按钮文本 - Windows Phone 7
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]);
}
}
谢谢大家,:P – 2012-01-13 03:54:11