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