void CreateReadOnlyTradeItemCollection() { if (TradeItems != null) { TradeItems.Dispose(); } TradeItems = ViewModelHelper.CreateReadOnlyDispatcherCollection( CurrentProduct.TradeItems, x => { var vm = new TradeItemViewModel(); vm.Initialize(x); return(vm); }, DispatcherHelper.UIDispatcher); }
public void RemoveItem(TradeItemViewModel parameter) { Debug.Print("RemoveItem"); CurrentProduct.TradeItems.Remove(parameter.Model); }