I want to Bind ListBox in windows phone .
i tried possible code but didn't get success.
can any one help me ,what mistake i did in this code , Please check once
.Xaml Code
and .CS code
ObservableCollection _StoInfoLst = new ObservableCollection();
void obb_getStoreInfoCompleted(object sender, LocalWalletServices.getStoreInfoCompletedEventArgs e)
{
if (e.Result != null)
{
listBox1.Items.Clear();
for (int i = 0; i < e.Result.storeInfoList.storeInfoCount; i++)
{
_StoInfoLst.Add(new YSP_StoreInfoList { Address1 = e.Result.storeInfoList.storeInfo[i].address1, StoreID = e.Result.storeInfoList.storeInfo[i].storeID });
}
listBox1.ItemsSource = _StoInfoLst;
//e.Result.storeInfoList.storeInfo[].
// daata insert
}
//throw new NotImplementedException();
}
and Class i used
and Class i used
internal class YSP_StoreInfoList
{
public string Address1 { get; set; }
public string StoreID { get; set; }
}
Replies
Know the answer? Post it — somebody with the same question will find it here.