コード例 #1
0
        void CreateReadOnlyTradeItemCollection()
        {
            if (TradeItems != null)
            {
                TradeItems.Dispose();
            }

            TradeItems = ViewModelHelper.CreateReadOnlyDispatcherCollection(
                CurrentProduct.TradeItems,
                x =>
            {
                var vm = new TradeItemViewModel();
                vm.Initialize(x);
                return(vm);
            },
                DispatcherHelper.UIDispatcher);
        }
コード例 #2
0
        public void RemoveItem(TradeItemViewModel parameter)
        {
            Debug.Print("RemoveItem");

            CurrentProduct.TradeItems.Remove(parameter.Model);
        }