user818700
user818700

Reputation:

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

I have a ListBox defined in my app that I've populated with some static data in the XAML code. If I were to reference this ListBox in my C# code, e.g.

searchList.....;

What method does one use to then dynamically add items to that ListBox in your code?

Thanks in advance!

Upvotes: 2

Views: 6534

Answers (1)

Ignacio Gómez
Ignacio Gómez

Reputation: 1637

Check out the listBox.Add.

Example:

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

Hope it helps

Upvotes: 5

Related Questions