Sunday, April 27, 2014

How To Bind a CheckBox inside a ListBox using MVVM in Windows Phone 8

my Propert is in a class that is being inherited by my ViewModel, and the setter is being set, but it only works when I move it out of the listbox.


or should I include the property here?:



public void LoadItems()
{
using(var db =new SQLite.SQLiteConnection(App.DB_Path))
{
var query = db.Table<ShoppingModel>().OrderBy(c => c.Item);

foreach (var item in query)
{
var items = new ShowingModel()
{
DisplayingItem = item.Item,
DisplayingPrice = item.Cost,
DisplayingQuantity = item.Qauntity,
DisplayingPackaging = item.Packaging,
};
ShoppingItems.Add(items);
}
}
}

plus this doesn't work on wp8:



RelativeSource Mode=FindAncestor, AncestorType=ListBox


No comments:

Post a Comment