<span style="white-space:pre"> </span>int count = 0;
public ButtonCodePage()
{
Button button = new Button
{
Text = String.Format("Tap for click count!")
};
button.Clicked += (sender, args) =>
{
count++;
button.Text =
String.Format("{0} click{1}!", count, count == 1 ? "" : "s");
};
this.Content = button;
}
Xamarin學習:點按按鈕累加次數並顯示
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.