簡體   English   中英

如何在Windows Phone 7 / C#中將項目動態添加到ListBox

[英]How to dynamically add items to ListBox in Windows Phone 7/C#

我在應用程序中定義了一個ListBox,並在XAML代碼中填充了一些靜態數據。 如果要在我的C#代碼中引用此ListBox,例如

searchList.....;

然后使用哪種方法將代碼中的項目動態添加到該ListBox?

提前致謝!

listBox.Add

例:

listBox1.Items.Add("Your item");

希望能幫助到你

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM