{
List
public MainWindow ()
{
InitializeComponent();
// Set the DataSource property of the ListBox called priceListBox1
priceListBox1.DataSource = _latestPriceList;
}
}
private void AddNewPrice(double newprice)
{
// Insert the string at the front of the List.
_latestPriceList.Insert(0, newprice);
// Force a refresh of the ListBox. ((CurrencyManager)priceListBox1.BindingContext[_latestPriceList]).Refresh();
}
No comments:
Post a Comment