Пример #1
0
        public ItemsPageViewModel(INavigationService navigationService, IPageDialogService dialogService,
                                  //Commented for testing purposes
                                  //ItemStore itemStore,
                                  ItemActionsCreator itemActionsCreator)
        {
            //Commented for testing purposes
            //this.itemStore = itemStore;

            this.dialogService      = dialogService;
            this.navigationService  = navigationService;
            this.itemActionsCreator = itemActionsCreator;

            Items = new ObservableCollection <ItemViewModel>();

            Title = "Browse";
        }
Пример #2
0
        public NewItemPageViewModel(INavigationService navigationService, IPageDialogService dialogService,
                                    ItemActionsCreator itemActionsCreator
                                    //Prism without Flux
                                    //IEventAggregator eventAggregator,
                                    //IItemService itemService
                                    )
        {
            //Prism without Flux
            //this.eventAggregator = eventAggregator;
            //this.itemService = itemService;

            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.itemActions       = itemActionsCreator;

            Item = new ItemViewModel
            {
                Text        = "Item name",
                Description = "This is an item description."
            };
        }